This commit is contained in:
dx 2015-02-17 03:34:00 +00:00
commit e665209bcc

View file

@ -162,7 +162,8 @@ char *word_complete(WINDOW_REC *window, const char *line, int *pos, int erase, i
if (isseparator(*line)) { if (isseparator(*line)) {
/* empty space at the start of line */ /* empty space at the start of line */
if (wordstart == line) if (wordstart == line)
wordstart += strlen(wordstart); while (wordstart != '\0' && isseparator(wordstart))
wordstart++;
} else { } else {
while (wordstart > line && isseparator(wordstart[-1])) while (wordstart > line && isseparator(wordstart[-1]))
wordstart--; wordstart--;