core: display an error when the buffer is not found with command /command -buffer

This commit is contained in:
Sébastien Helleu 2020-11-17 13:43:20 +01:00
parent 6fda5a7e5f
commit 21eadc9488
2 changed files with 7 additions and 1 deletions

View File

@ -25,6 +25,7 @@ New features::
Bug fixes::
* core: display an error when the buffer is not found with command /command -buffer
* spell: fix refresh of bar item "spell_suggest" when the input becomes empty (issue #1586)
[[v3.0]]

View File

@ -1633,7 +1633,12 @@ COMMAND_CALLBACK(command)
{
ptr_buffer = gui_buffer_search_by_full_name (argv[2]);
if (!ptr_buffer)
ptr_buffer = buffer;
{
gui_chat_printf (NULL,
_("%sError: buffer not found"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
return WEECHAT_RC_OK;
}
index_args = 3;
}