summaryrefslogtreecommitdiffstats
path: root/src/getchar.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-06-07 22:04:52 +0200
committerBram Moolenaar <Bram@vim.org>2021-06-07 22:04:52 +0200
commitc41badb748bbaa78cbadfcda9ca965e8a283fb9b (patch)
tree01240bdb613c21b0b5648361c7716032ebff49ec /src/getchar.c
parent8cf02e5cf8fb14a5009f12e7af0a47617a0ce88d (diff)
patch 8.2.2961: keys typed during a :normal command are discardedv8.2.2961
Problem: Keys typed during a :normal command are discarded. Solution: Concatenate saved typeahead and typed kesy. (closes #8340)
Diffstat (limited to 'src/getchar.c')
-rw-r--r--src/getchar.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/getchar.c b/src/getchar.c
index 3b069c4386..149bf55a0a 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -1414,9 +1414,10 @@ save_typeahead(tasave_T *tp)
/*
* Restore the typeahead to what it was before calling save_typeahead().
* The allocated memory is freed, can only be called once!
+ * When "overwrite" is FALSE input typed later is kept.
*/
void
-restore_typeahead(tasave_T *tp)
+restore_typeahead(tasave_T *tp, int overwrite UNUSED)
{
if (tp->typebuf_valid)
{
@@ -1432,7 +1433,7 @@ restore_typeahead(tasave_T *tp)
free_buff(&readbuf2);
readbuf2 = tp->save_readbuf2;
# ifdef USE_INPUT_BUF
- set_input_buf(tp->save_inputbuf);
+ set_input_buf(tp->save_inputbuf, overwrite);
# endif
}