summaryrefslogtreecommitdiff
path: root/src/plugins/fset/fset-command.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2017-06-21 20:49:36 +0200
committerSébastien Helleu <flashcode@flashtux.org>2017-06-25 16:35:28 +0200
commit0f8db0fa2e0d8365ccd27c2942464d305a8cf989 (patch)
tree706f5a97a6d1eedd30f1599fea741a62a2be1190 /src/plugins/fset/fset-command.c
parentd2a9d839a16f80ac031777e59c6ae4ba39f61a74 (diff)
downloadweechat-0f8db0fa2e0d8365ccd27c2942464d305a8cf989.zip
fset: add key/input to set new value for an option (alt-f,alt-n or input "n", command /fset -setnew)
Diffstat (limited to 'src/plugins/fset/fset-command.c')
-rw-r--r--src/plugins/fset/fset-command.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/fset/fset-command.c b/src/plugins/fset/fset-command.c
index f1e649252..6526065c9 100644
--- a/src/plugins/fset/fset-command.c
+++ b/src/plugins/fset/fset-command.c
@@ -358,6 +358,13 @@ fset_command_fset (const void *pointer, void *data,
return WEECHAT_RC_OK;
}
+ if (weechat_strcasecmp (argv[1], "-setnew") == 0)
+ {
+ fset_command_get_option (&ptr_fset_option, &ptr_option);
+ fset_option_set (ptr_fset_option, ptr_option, buffer, -1);
+ return WEECHAT_RC_OK;
+ }
+
if (weechat_strcasecmp (argv[1], "-append") == 0)
{
fset_command_get_option (&ptr_fset_option, &ptr_option);
@@ -587,6 +594,7 @@ fset_command_init ()
" || -reset"
" || -unset"
" || -set"
+ " || -setnew"
" || -append"
" || -mark"
" || -format"
@@ -610,6 +618,8 @@ fset_command_init ()
" -unset: unset the option\n"
" -set: add the /set command in input to edit the value of "
"option (move the cursor at the beginning of value)\n"
+ " -setnew: add the /set command in input to edit a new value "
+ "for the option\n"
" -append: add the /set command to append something in the value "
"of option (move the cursor at the end of value)\n"
" -mark: toggle mark\n"
@@ -719,6 +729,7 @@ fset_command_init ()
" alt+f, alt+r r reset value\n"
" alt+f, alt+u u unset value\n"
" alt+enter s set value\n"
+ " alt+f, alt+n n set new value\n"
" alt+f, alt+a a append to value\n"
" alt+',' , mark/unmark option\n"
" shift+up move one line up and mark/unmark option\n"
@@ -784,6 +795,7 @@ fset_command_init ()
" || -reset"
" || -unset"
" || -set"
+ " || -setnew"
" || -append"
" || -mark"
" || -format"