From 7d7ca34a41d1f031a8e1e189f33e202bf6183803 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Fri, 27 Jul 2018 07:48:02 +0200 Subject: core: allow partial buffer name in command /buffer close (closes #1226) --- ChangeLog.adoc | 4 ++++ src/core/wee-command.c | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index c04b6a78a..76b4c17cc 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -18,6 +18,10 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] [[v2.3]] == Version 2.3 (under dev) +New features:: + + * core: allow partial buffer name in command /buffer close (issue #1226) + Bug fixes:: * core: send signal "key_pressed" for mouse code only if the string is UTF-8 valid (issue #1220) diff --git a/src/core/wee-command.c b/src/core/wee-command.c index 91c3c068d..c76f4be92 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -1063,6 +1063,11 @@ COMMAND_CALLBACK(buffer) else { ptr_buffer = gui_buffer_search_by_full_name (argv_eol[2]); + if (!ptr_buffer) + { + ptr_buffer = gui_buffer_search_by_partial_name ( + NULL, argv_eol[2]); + } if (ptr_buffer) { if (ptr_buffer == weechat_buffer) -- cgit v1.2.3