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
This commit is contained in:
bfredl
2022-01-27 13:45:34 +01:00
committed by GitHub
4 changed files with 111 additions and 19 deletions

View File

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