commit 992eaac08218c037ffa8980f36a628f5b293355b
parent 43339dee40aa7731cc644315c15080e30aa1a67c
Author: Jan Edmund Lazo <janedmundlazo@hotmail.com>
Date: Fri, 16 Jan 2026 02:11:07 -0500
vim-patch:8.2.0370: the typebuf_was_filled flag is sometimes not reset (#37404)
Problem: The typebuf_was_filled flag is sometimes not reset, which may
cause a hang.
Solution: Make sure typebuf_was_filled is reset when the typeahead buffer is
empty.
https://github.com/vim/vim/commit/e49b4bb89505fad28cf89f0891aef3e2d397919e
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c
@@ -458,6 +458,9 @@ void flush_buffers(flush_buffers_T flush_typeahead)
typebuf.tb_off += typebuf.tb_maplen;
typebuf.tb_len -= typebuf.tb_maplen;
}
+ if (typebuf.tb_len == 0) {
+ typebuf_was_filled = false;
+ }
} else {
// remove typeahead
if (flush_typeahead == FLUSH_INPUT) {
@@ -1300,6 +1303,7 @@ static void alloc_typebuf(void)
if (++typebuf.tb_change_cnt == 0) {
typebuf.tb_change_cnt = 1;
}
+ typebuf_was_filled = false;
}
/// Free the buffers of "typebuf".