Mercurial > vim
diff src/getchar.c @ 14069:bc91de20ba43 v8.1.0052
patch 8.1.0052: when mapping to <Nop> times out the next mapping is skipped
commit https://github.com/vim/vim/commit/83f4cbd973731872b633d6ba0caf850fb708d70c
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jun 12 21:35:40 2018 +0200
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)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 12 Jun 2018 21:45:08 +0200 |
parents | 830a47e48791 |
children | 381b01f77461 |
line wrap: on
line diff
--- a/src/getchar.c +++ b/src/getchar.c @@ -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,