diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2005-08-16 15:02:01 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2005-08-16 15:02:01 +0000 |
commit | 3f946e304d18d384bb2f84cf0e5f3f512008ff4c (patch) | |
tree | 0afde10cb1a370a4c1de53b44fe918607e16c5a9 /src/common/completion.c | |
parent | 97b6bbcb9e1f20c7cad21ee1395d75c52bc0ba66 (diff) | |
download | weechat-3f946e304d18d384bb2f84cf0e5f3f512008ff4c.zip |
Added completion for internal functions with /key command
Diffstat (limited to 'src/common/completion.c')
-rw-r--r-- | src/common/completion.c | 38 |
1 files changed, 26 insertions, 12 deletions
diff --git a/src/common/completion.c b/src/common/completion.c index 4303eedc2..decfad2c8 100644 --- a/src/common/completion.c +++ b/src/common/completion.c @@ -201,19 +201,33 @@ completion_build_list (t_completion *completion, void *channel) } return; } - if ((strcasecmp (completion->base_command, "key") == 0) - && (completion->base_command_arg == 1)) + if (strcasecmp (completion->base_command, "key") == 0) { - weelist_add (&completion->completion_list, - &completion->last_completion, - "unbind"); - weelist_add (&completion->completion_list, - &completion->last_completion, - "functions"); - weelist_add (&completion->completion_list, - &completion->last_completion, - "reset"); - return; + if (completion->base_command_arg == 1) + { + weelist_add (&completion->completion_list, + &completion->last_completion, + "unbind"); + weelist_add (&completion->completion_list, + &completion->last_completion, + "functions"); + weelist_add (&completion->completion_list, + &completion->last_completion, + "reset"); + return; + } + if (completion->base_command_arg == 2) + { + i = 0; + while (gui_key_functions[i].function_name) + { + weelist_add (&completion->completion_list, + &completion->last_completion, + gui_key_functions[i].function_name); + i++; + } + return; + } } if (((strcasecmp (completion->base_command, "perl") == 0) || (strcasecmp (completion->base_command, "python") == 0)) |