From 63a05d72d90cce719b45cc9ab8248da12905d9b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Tue, 17 Sep 2019 21:21:28 +0200 Subject: [PATCH] buflist: fix extra spaces between buffers when conditions are used to hide buffers (closes #1403) This is a regression introduced in version 2.6 by commit bf21ca072d5250b1196e62db61f3ba675ee89b52. --- ChangeLog.adoc | 5 +++++ src/plugins/buflist/buflist-bar-item.c | 15 ++++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 458d30184..b85d29556 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -18,7 +18,12 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] [[v2.7]] == Version 2.7 (under dev) +Bug fixes:: + + * buflist: fix extra spaces between buffers when conditions are used to hide buffers (regression introduced in version 2.6) (issue #1403) + Build:: + * core: remove file FindTCL.cmake * core: display an error on missing dependency in CMake (issue #916, issue #956) diff --git a/src/plugins/buflist/buflist-bar-item.c b/src/plugins/buflist/buflist-bar-item.c index c3f108507..fc4a6f8ff 100644 --- a/src/plugins/buflist/buflist-bar-item.c +++ b/src/plugins/buflist/buflist-bar-item.c @@ -359,13 +359,6 @@ buflist_bar_item_buflist_cb (const void *pointer, void *data, ptr_buffer, "name"); } - if (weechat_config_boolean (buflist_config_look_add_newline) - && *buflist[0]) - { - if (!weechat_string_dyn_concat (buflist, "\n")) - goto error; - } - /* current buffer */ current_buffer = (ptr_buffer == ptr_current_buffer); weechat_hashtable_set (buflist_hashtable_extra_vars, @@ -588,6 +581,14 @@ buflist_bar_item_buflist_cb (const void *pointer, void *data, line_number_current_buffer = line_number; prev_number = number; + /* add newline between each buffer (if needed) */ + if (weechat_config_boolean (buflist_config_look_add_newline) + && *buflist[0]) + { + if (!weechat_string_dyn_concat (buflist, "\n")) + goto error; + } + /* build string */ line = weechat_string_eval_expression ( (current_buffer) ? ptr_format_current : ptr_format,