fset: add separate word of each option in completion
This commit is contained in:
parent
dc946e55a5
commit
fdf7a5f13d
@ -38,7 +38,8 @@ fset_completion_option_cb (const void *pointer, void *data,
|
||||
struct t_config_file *ptr_config;
|
||||
struct t_config_section *ptr_section;
|
||||
struct t_config_option *ptr_option;
|
||||
int config_section_added;
|
||||
char **words;
|
||||
int config_section_added, num_words, i;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) pointer;
|
||||
@ -73,10 +74,18 @@ fset_completion_option_cb (const void *pointer, void *data,
|
||||
0, WEECHAT_LIST_POS_SORT);
|
||||
config_section_added = 1;
|
||||
}
|
||||
weechat_hook_completion_list_add (
|
||||
completion,
|
||||
words = weechat_string_split (
|
||||
weechat_config_option_get_string (ptr_option, "name"),
|
||||
0, WEECHAT_LIST_POS_SORT);
|
||||
"_", 0, 0, &num_words);
|
||||
if (words)
|
||||
{
|
||||
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);
|
||||
}
|
||||
ptr_option = weechat_hdata_move (fset_hdata_config_option,
|
||||
ptr_option, 1);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user