diff options
author | Emanuele Giaquinta <exg@irssi.org> | 2007-04-14 11:01:56 +0000 |
---|---|---|
committer | exg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2007-04-14 11:01:56 +0000 |
commit | d701ef40243deec1062a96553bbf7fb5fd1c2147 (patch) | |
tree | 2c543275f88d896fe2d254a81167d6fc6b2a4676 | |
parent | 9898328865b75d4dde9f2a5ff60cfab473c415eb (diff) | |
download | irssi-d701ef40243deec1062a96553bbf7fb5fd1c2147.zip |
Make completer for action/msg/query more self-contained by completing nicks in
the active channel.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4443 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r-- | src/fe-common/core/chat-completion.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/fe-common/core/chat-completion.c b/src/fe-common/core/chat-completion.c index c9f9efe3..9704f00e 100644 --- a/src/fe-common/core/chat-completion.c +++ b/src/fe-common/core/chat-completion.c @@ -579,14 +579,11 @@ GList *completion_get_aliases(const char *word) } static void complete_window_nicks(GList **list, WINDOW_REC *window, - const char *word, const char *linestart) + const char *word, const char *nicksuffix) { CHANNEL_REC *channel; GList *tmplist; GSList *tmp; - const char *nicksuffix; - - nicksuffix = *linestart != '\0' ? NULL : completion_char; channel = CHANNEL(window->active); @@ -663,7 +660,8 @@ static void sig_complete_word(GList **list, WINDOW_REC *window, } else if (channel != NULL) { /* nick completion .. we could also be completing a nick after /MSG from nicks in channel */ - complete_window_nicks(list, window, word, linestart); + const char *suffix = *linestart != '\0' ? NULL : completion_char; + complete_window_nicks(list, window, word, suffix); } else if (window->level & MSGLEVEL_MSGS) { /* msgs window, complete /MSG nicks */ *list = g_list_concat(completion_msg(server, NULL, word, NULL), *list); @@ -707,6 +705,8 @@ static void sig_complete_msg(GList **list, WINDOW_REC *window, msgserver = line_get_server(line); *list = completion_msg(server, msgserver, word, NULL); + if (CHANNEL(window->active) != NULL) + complete_window_nicks(list, window, word, NULL); if (*list != NULL) signal_stop(); } |