diff options
Diffstat (limited to 'src/core/wee-command.c')
-rw-r--r-- | src/core/wee-command.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/wee-command.c b/src/core/wee-command.c index b2677346f..0e1092c5c 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -837,7 +837,14 @@ COMMAND_CALLBACK(buffer) else { ptr_buffer = gui_buffer_search_by_full_name (argv_eol[2]); - if (ptr_buffer) + if (ptr_buffer == weechat_buffer) + { + gui_chat_printf (NULL, + _("%sError: WeeChat main buffer can't be " + "closed"), + gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]); + } + else gui_buffer_close (ptr_buffer); } } |