aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <janedmundlazo@hotmail.com>2018-08-23 22:51:10 -0400
committerJan Edmund Lazo <janedmundlazo@hotmail.com>2018-09-04 10:00:17 -0400
commit3b744f1ea273949069523a7d66d43f9ac1115317 (patch)
tree722c81e51bb96d72183805eaa5af8bfccdb17a8e
parentefa132da827f7df03ba9041e0db5b824fbacde6c (diff)
downloadrneovim-3b744f1ea273949069523a7d66d43f9ac1115317.tar.gz
rneovim-3b744f1ea273949069523a7d66d43f9ac1115317.tar.bz2
rneovim-3b744f1ea273949069523a7d66d43f9ac1115317.zip
vim-patch:8.1.0052: when mapping to <Nop> times out the next mapping is skipped
Problem: When a mapping to <Nop> times out the next mapping is skipped. Solution: Reset "timedout" when waiting for a character. (Christian Brabandt, closes vim/vim#2921) https://github.com/vim/vim/commit/83f4cbd973731872b633d6ba0caf850fb708d70c
-rw-r--r--src/nvim/getchar.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c
index 17168e7ca2..eb4146d8a5 100644
--- a/src/nvim/getchar.c
+++ b/src/nvim/getchar.c
@@ -2255,6 +2255,11 @@ static int vgetorpeek(int advance)
/*
* get a character: 3. from the user - get it
*/
+ if (typebuf.tb_len == 0) {
+ // timedout may have been set while waiting for a mapping
+ // that has a <Nop> RHS.
+ timedout = false;
+ }
wait_tb_len = typebuf.tb_len;
c = inchar(typebuf.tb_buf + typebuf.tb_off + typebuf.tb_len,
typebuf.tb_buflen - typebuf.tb_off - typebuf.tb_len - 1,