diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/wee-command.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/core/wee-command.c b/src/core/wee-command.c index 6d438498b..7ddb55edf 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -872,6 +872,14 @@ COMMAND_CALLBACK(buffer) gui_buffer_switch_by_number (gui_current_window, target_buffer); } + else + { + /* invalid number */ + gui_chat_printf (NULL, + _("%sError: incorrect buffer number"), + gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]); + return WEECHAT_RC_OK; + } return WEECHAT_RC_OK; } @@ -889,6 +897,14 @@ COMMAND_CALLBACK(buffer) gui_buffer_switch_by_number (gui_current_window, target_buffer); } + else + { + /* invalid number */ + gui_chat_printf (NULL, + _("%sError: incorrect buffer number"), + gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]); + return WEECHAT_RC_OK; + } return WEECHAT_RC_OK; } @@ -916,6 +932,14 @@ COMMAND_CALLBACK(buffer) } } } + else + { + /* invalid number */ + gui_chat_printf (NULL, + _("%sError: incorrect buffer number"), + gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]); + return WEECHAT_RC_OK; + } return WEECHAT_RC_OK; } @@ -937,6 +961,12 @@ COMMAND_CALLBACK(buffer) gui_window_switch_to_buffer (gui_current_window, ptr_buffer, 1); } + gui_chat_printf (NULL, + _("%sError: unknown option for \"%s\" " + "command"), + gui_chat_prefix[GUI_CHAT_PREFIX_ERROR], + "buffer"); + return WEECHAT_RC_OK; } |