1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

core: display an error if parameters are missing or if the buffer is not with "free content" in command /window scroll_horiz

This commit is contained in:
Sébastien Helleu
2025-11-12 07:12:00 +01:00
parent 90a42ee213
commit d5bfe35245
+4 -5
View File
@@ -8035,11 +8035,10 @@ COMMAND_CALLBACK(window)
/* horizontal scroll in window (for buffers with free content) */
if (string_strcmp (argv[1], "scroll_horiz") == 0)
{
if ((argc > win_args)
&& (ptr_win->buffer->type == GUI_BUFFER_TYPE_FREE))
{
gui_window_scroll_horiz (ptr_win, argv[win_args]);
}
COMMAND_MIN_ARGS(win_args + 1, argv[1]);
if (ptr_win->buffer->type != GUI_BUFFER_TYPE_FREE)
COMMAND_ERROR;
gui_window_scroll_horiz (ptr_win, argv[win_args]);
return WEECHAT_RC_OK;
}