mirror of
https://github.com/neovim/neovim.git
synced 2026-04-02 05:39:26 +00:00
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.
e49b4bb895
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -458,6 +458,9 @@ void flush_buffers(flush_buffers_T flush_typeahead)
|
|||||||
typebuf.tb_off += typebuf.tb_maplen;
|
typebuf.tb_off += typebuf.tb_maplen;
|
||||||
typebuf.tb_len -= typebuf.tb_maplen;
|
typebuf.tb_len -= typebuf.tb_maplen;
|
||||||
}
|
}
|
||||||
|
if (typebuf.tb_len == 0) {
|
||||||
|
typebuf_was_filled = false;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// remove typeahead
|
// remove typeahead
|
||||||
if (flush_typeahead == FLUSH_INPUT) {
|
if (flush_typeahead == FLUSH_INPUT) {
|
||||||
@@ -1300,6 +1303,7 @@ static void alloc_typebuf(void)
|
|||||||
if (++typebuf.tb_change_cnt == 0) {
|
if (++typebuf.tb_change_cnt == 0) {
|
||||||
typebuf.tb_change_cnt = 1;
|
typebuf.tb_change_cnt = 1;
|
||||||
}
|
}
|
||||||
|
typebuf_was_filled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Free the buffers of "typebuf".
|
/// Free the buffers of "typebuf".
|
||||||
|
|||||||
Reference in New Issue
Block a user