diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-01-27 13:45:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-27 13:45:34 +0100 |
commit | d95bb8502435acf79239264bf545d64907fcee05 (patch) | |
tree | d5c916a97066f6bce1ab5e342653a010e23d4426 /src/nvim/normal.c | |
parent | a47fdf8421142532d27354f58109da220c45a5fb (diff) | |
parent | 5c897b6d0ceb7e7d40c0b740ab36d38bf3a4162d (diff) | |
download | rneovim-d95bb8502435acf79239264bf545d64907fcee05.tar.gz rneovim-d95bb8502435acf79239264bf545d64907fcee05.tar.bz2 rneovim-d95bb8502435acf79239264bf545d64907fcee05.zip |
Merge pull request #17185 from zeertzjq/vim-8.2.3993
vim-patch:8.2.{3993,4002}: when recording a change in Select mode char appears twice
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r-- | src/nvim/normal.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c index 0ac4039d11..ddebfb9756 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -1011,7 +1011,12 @@ static int normal_execute(VimState *state, int key) // restart automatically. // Insert the typed character in the typeahead buffer, so that it can // be mapped in Insert mode. Required for ":lmap" to work. - ins_char_typebuf(s->c, mod_mask); + int len = ins_char_typebuf(s->c, mod_mask); + + // When recording the character will be recorded again, remove the + // previously recording. + ungetchars(len); + if (restart_edit != 0) { s->c = 'd'; } else { |