0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

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 #2921)
This commit is contained in:
Bram Moolenaar
2018-06-12 21:35:40 +02:00
parent 79c6b51e40
commit 83f4cbd973
2 changed files with 7 additions and 0 deletions

View File

@@ -2856,6 +2856,11 @@ 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,