From d701ef40243deec1062a96553bbf7fb5fd1c2147 Mon Sep 17 00:00:00 2001 From: Emanuele Giaquinta Date: Sat, 14 Apr 2007 11:01:56 +0000 Subject: [PATCH] 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 --- src/fe-common/core/chat-completion.c | 10 +++++----- 1 file 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(); }