0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.2961: keys typed during a :normal command are discarded

Problem:    Keys typed during a :normal command are discarded.
Solution:   Concatenate saved typeahead and typed kesy. (closes #8340)
This commit is contained in:
Bram Moolenaar
2021-06-07 22:04:52 +02:00
parent 8cf02e5cf8
commit c41badb748
8 changed files with 23 additions and 10 deletions

View File

@@ -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
}