summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2023-01-21 20:47:29 +0100
committerSébastien Helleu <flashcode@flashtux.org>2023-01-28 15:14:06 +0100
commitc724032a220790cd3a62154e8b482ff08af21abc (patch)
treedefbd351d2f46f9aa64d89c63eff1b769123a681 /src
parent2ee65dd1ff359404b307f1452ef0610169dfb336 (diff)
downloadweechat-c724032a220790cd3a62154e8b482ff08af21abc.zip
core: make function gui_buffer_match_list case sensitive (issue #1872)
Diffstat (limited to 'src')
-rw-r--r--src/gui/gui-buffer.c4
-rw-r--r--src/plugins/python/weechat.pyi2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c
index 4cfed5886..24ea19037 100644
--- a/src/gui/gui-buffer.c
+++ b/src/gui/gui-buffer.c
@@ -1138,6 +1138,8 @@ gui_buffer_string_replace_local_var (struct t_gui_buffer *buffer,
* List is a comma-separated list of buffers, where exclusion is possible with
* char '!', and "*" means all buffers.
*
+ * Comparison is case sensitive.
+ *
* Examples:
* "*"
* "*,!*#weechat*"
@@ -1165,7 +1167,7 @@ gui_buffer_match_list (struct t_gui_buffer *buffer, const char *string)
if (buffers)
{
match = string_match_list (buffer->full_name,
- (const char **)buffers, 0);
+ (const char **)buffers, 1);
string_free_split (buffers);
}
diff --git a/src/plugins/python/weechat.pyi b/src/plugins/python/weechat.pyi
index f5a57f20e..86b7e33d8 100644
--- a/src/plugins/python/weechat.pyi
+++ b/src/plugins/python/weechat.pyi
@@ -1746,7 +1746,7 @@ def buffer_match_list(buffer: str, string: str) -> int:
if buffer:
weechat.prnt("", "%d" % weechat.buffer_match_list(buffer, "*")) # 1
weechat.prnt("", "%d" % weechat.buffer_match_list(buffer, "*,!*#weechat*")) # 0
- weechat.prnt("", "%d" % weechat.buffer_match_list(buffer, "irc.libera.*")) # 1
+ weechat.prnt("", "%d" % weechat.buffer_match_list(buffer, "irc.libera.*")) # 1
weechat.prnt("", "%d" % weechat.buffer_match_list(buffer, "irc.oftc.*,python.*")) # 0
"""
...