summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2017-06-21 21:25:51 +0200
committerSébastien Helleu <flashcode@flashtux.org>2017-06-25 16:35:28 +0200
commit492853673a71f6e9471df83e0134f7f5163a38d1 (patch)
treee47084b59cfb7df81c6e011f47688ec13c7e2fb0 /src
parent0f8db0fa2e0d8365ccd27c2942464d305a8cf989 (diff)
downloadweechat-492853673a71f6e9471df83e0134f7f5163a38d1.zip
fset: set new value for non-boolean options with alt+space
Diffstat (limited to 'src')
-rw-r--r--src/plugins/fset/fset-command.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/plugins/fset/fset-command.c b/src/plugins/fset/fset-command.c
index 6526065c9..c4175a607 100644
--- a/src/plugins/fset/fset-command.c
+++ b/src/plugins/fset/fset-command.c
@@ -254,7 +254,10 @@ fset_command_fset (const void *pointer, void *data,
else
{
fset_command_get_option (&ptr_fset_option, &ptr_option);
- fset_option_toggle_value (ptr_fset_option, ptr_option);
+ if (ptr_fset_option->type == FSET_OPTION_TYPE_BOOLEAN)
+ fset_option_toggle_value (ptr_fset_option, ptr_option);
+ else
+ fset_option_set (ptr_fset_option, ptr_option, buffer, -1);
}
return WEECHAT_RC_OK;
}
@@ -611,9 +614,11 @@ fset_command_init ()
"on the right\n"
" -go: select a line by number, first line number is 0 "
"(\"end\" to select the last line)\n"
- " -toggle: toggle the boolean value\n"
- " -add: add \"value\", which can be a negative number "
- "(only for integers and colors)\n"
+ " -toggle: toggle the boolean value, set a new value for other "
+ "types\n"
+ " -add: add \"value\" (which can be a negative number) "
+ "for integers and colors, set/append to value for other types "
+ "(set for a negative value, append for a positive value)\n"
" -reset: reset the value of option\n"
" -unset: unset the option\n"
" -set: add the /set command in input to edit the value of "