diff options
author | Timo Sirainen <cras@irssi.org> | 2000-07-09 13:28:14 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-07-09 13:28:14 +0000 |
commit | be643cb48a13f6792af361a890bf3584232faaaa (patch) | |
tree | d2e9900696002876fef65f641c5e83d9302920a4 | |
parent | 273688f6d7820de8d78b1ae1f297fde4f0b5c799 (diff) | |
download | irssi-be643cb48a13f6792af361a890bf3584232faaaa.zip |
-option tab-completion didn't work.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@442 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r-- | src/fe-common/core/completion.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/fe-common/core/completion.c b/src/fe-common/core/completion.c index aa1859c7..70415113 100644 --- a/src/fe-common/core/completion.c +++ b/src/fe-common/core/completion.c @@ -386,8 +386,10 @@ GList *completion_get_options(const char *cmd, const char *option) list = NULL; len = strlen(option); for (tmp = rec->options; *tmp != NULL; tmp++) { - if (len == 0 || g_strncasecmp(*tmp, option, len) == 0) - list = g_list_append(list, g_strconcat("-", *tmp + iscmdtype(**tmp), NULL)); + const char *optname = *tmp + iscmdtype(**tmp); + + if (len == 0 || g_strncasecmp(optname, option, len) == 0) + list = g_list_append(list, g_strconcat("-", optname, NULL)); } return list; |