From 2b8792e303b4a5243b8a19a27cd1bd8885341b38 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 5 Aug 2018 17:14:23 -0400 Subject: 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) https://github.com/vim/vim/commit/4eb6531b03445b4d492bc52fea0b6dcd886583af --- src/nvim/getchar.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index 563608dd1d..158328a7d2 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -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; -- cgit