From 3b744f1ea273949069523a7d66d43f9ac1115317 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Thu, 23 Aug 2018 22:51:10 -0400 Subject: vim-patch:8.1.0052: when mapping to times out the next mapping is skipped Problem: When a mapping to 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 --- src/nvim/getchar.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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 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, -- cgit