Mercurial > vim
diff src/getchar.c @ 24846:fdc6a7769045 v8.2.2961
patch 8.2.2961: keys typed during a :normal command are discarded
Commit: https://github.com/vim/vim/commit/c41badb748bbaa78cbadfcda9ca965e8a283fb9b
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jun 7 22:04:52 2021 +0200
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 https://github.com/vim/vim/issues/8340)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 07 Jun 2021 22:15:04 +0200 |
parents | 3f9053c21765 |
children | 8f2262c72178 |
line wrap: on
line diff
--- 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 }