aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/normal.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r--src/nvim/normal.c7
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 {