From 93fd6b96ceac294fe65907f19a515fecfff023af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Fri, 2 Jun 2017 21:42:10 +0200 Subject: [PATCH] fset: fix error when clicking on a line after the last option displayed --- src/plugins/fset/fset-command.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/plugins/fset/fset-command.c b/src/plugins/fset/fset-command.c index a9b8c7caa..f1ff405a3 100644 --- a/src/plugins/fset/fset-command.c +++ b/src/plugins/fset/fset-command.c @@ -170,10 +170,11 @@ fset_command_fset (const void *pointer, void *data, line = weechat_arraylist_size (fset_options) - 1; else line = fset_command_get_int_arg (argc, argv, 2, -1); - if (line < 0) - WEECHAT_COMMAND_ERROR; - fset_buffer_set_current_line (line); - fset_buffer_check_line_outside_window (); + if (line >= 0) + { + fset_buffer_set_current_line (line); + fset_buffer_check_line_outside_window (); + } } return WEECHAT_RC_OK; }