diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2017-06-18 15:55:41 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2017-06-25 16:35:28 +0200 |
commit | 74dec956556dae14c26f894705e53025265fdfb4 (patch) | |
tree | d817fb25b315264636dc42570eb50e61f5ec560b /src | |
parent | 68b337eb606214c64e6ae735765ab6753f3f511a (diff) | |
download | weechat-74dec956556dae14c26f894705e53025265fdfb4.zip |
fset: add option name in completion, in addition to words
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/fset/fset-completion.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/fset/fset-completion.c b/src/plugins/fset/fset-completion.c index 3fe765e5e..be6f2d17b 100644 --- a/src/plugins/fset/fset-completion.c +++ b/src/plugins/fset/fset-completion.c @@ -74,18 +74,24 @@ fset_completion_option_cb (const void *pointer, void *data, 0, WEECHAT_LIST_POS_SORT); config_section_added = 1; } + weechat_hook_completion_list_add ( + completion, + weechat_config_option_get_string (ptr_option, "name"), + 0, + WEECHAT_LIST_POS_SORT); words = weechat_string_split ( weechat_config_option_get_string (ptr_option, "name"), "_", 0, 0, &num_words); - if (words) + if (words && (num_words > 1)) { for (i = 0; i < num_words; i++) { weechat_hook_completion_list_add ( completion, words[i], 0, WEECHAT_LIST_POS_SORT); } - weechat_string_free_split (words); } + if (words) + weechat_string_free_split (words); ptr_option = weechat_hdata_move (fset_hdata_config_option, ptr_option, 1); } |