aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/getchar.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/getchar.c')
-rw-r--r--src/nvim/getchar.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c
index 7e4a0e1321..277af74897 100644
--- a/src/nvim/getchar.c
+++ b/src/nvim/getchar.c
@@ -2342,6 +2342,17 @@ static int vgetorpeek(int advance)
}
}
+ if (timedout && c == ESC) {
+ char_u nop_buf[3];
+
+ // When recording there will be no timeout. Add a <Nop> after the ESC
+ // to avoid that it forms a key code with following characters.
+ nop_buf[0] = K_SPECIAL;
+ nop_buf[1] = KS_EXTRA;
+ nop_buf[2] = KE_NOP;
+ gotchars(nop_buf, 3);
+ }
+
--vgetc_busy;
return c;