vim-patch:8.0.0671: hang when typing CTRL-C in confirm() in timer

Problem:    When a function invoked from a timer calls confirm() and the user
            types CTRL-C then Vim hangs.
Solution:   Reset typebuf_was_filled. (Ozaki Kiichi, closes vim/vim#1791)
4eb6531b03
This commit is contained in:
Jan Edmund Lazo 2018-08-05 17:14:23 -04:00
parent b42c80e561
commit 2b8792e303

View File

@ -439,6 +439,9 @@ void flush_buffers(int flush_typeahead)
;
typebuf.tb_off = MAXMAPLEN;
typebuf.tb_len = 0;
// Reset the flag that text received from a client or from feedkeys()
// was inserted in the typeahead buffer.
typebuf_was_filled = false;
} else { /* remove mapped characters at the start only */
typebuf.tb_off += typebuf.tb_maplen;
typebuf.tb_len -= typebuf.tb_maplen;