1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00

Do nothing in word_complete if erase is true and we are not continuing

a completion.


git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4844 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Emanuele Giaquinta 2008-05-23 09:47:40 +00:00 committed by exg
parent 8e8d46f211
commit 54f5beb8f5

View File

@ -143,6 +143,9 @@ char *word_complete(WINDOW_REC *window, const char *line, int *pos, int erase, i
continue_complete = complist != NULL && *pos == last_line_pos && continue_complete = complist != NULL && *pos == last_line_pos &&
strcmp(line, last_line) == 0; strcmp(line, last_line) == 0;
if (erase && !continue_complete)
return NULL;
old_startpos = startpos; old_startpos = startpos;
old_wordlen = wordlen; old_wordlen = wordlen;
@ -193,9 +196,6 @@ char *word_complete(WINDOW_REC *window, const char *line, int *pos, int erase, i
if (erase) { if (erase) {
signal_emit("complete erase", 3, window, word, linestart); signal_emit("complete erase", 3, window, word, linestart);
if (!continue_complete)
return NULL;
/* jump to next completion */ /* jump to next completion */
word = NULL; word = NULL;
linestart = NULL; linestart = NULL;