diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/fe-common/core/completion.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 "<tab>, 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; |