From c4fe917be33f3984bbafd2dcded0eee2478899b2 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sun, 29 Jul 2001 04:38:31 +0000 Subject: [PATCH] " " in query printed glib warnings. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1677 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-common/core/completion.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fe-common/core/completion.c b/src/fe-common/core/completion.c index 49e74783..c73b8d38 100644 --- a/src/fe-common/core/completion.c +++ b/src/fe-common/core/completion.c @@ -156,7 +156,8 @@ char *word_complete(WINDOW_REC *window, const char *line, int *pos) BUT if we start completion with "/msg ", we don't want to complete the /msg word, but instead complete empty word with /msg being in linestart. */ - if (*pos > 0 && line[*pos-1] == ' ') { + if (*pos > 0 && line[*pos-1] == ' ' && + (*linestart == '\0' || wordstart[-1] != ' ')) { char *old; old = linestart;