aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/getchar.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/getchar.c')
-rw-r--r--src/nvim/getchar.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c
index 563608dd1d..e20c75cf7b 100644
--- a/src/nvim/getchar.c
+++ b/src/nvim/getchar.c
@@ -439,7 +439,10 @@ void flush_buffers(int flush_typeahead)
;
typebuf.tb_off = MAXMAPLEN;
typebuf.tb_len = 0;
- } else { /* remove mapped characters at the start only */
+ // 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;
}
@@ -1077,9 +1080,10 @@ void del_typebuf(int len, int offset)
/* Reset the flag that text received from a client or from feedkeys()
* was inserted in the typeahead buffer. */
- typebuf_was_filled = FALSE;
- if (++typebuf.tb_change_cnt == 0)
+ typebuf_was_filled = false;
+ if (++typebuf.tb_change_cnt == 0) {
typebuf.tb_change_cnt = 1;
+ }
}
/*