diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-01-05 08:17:55 -0500 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-01-05 10:35:49 -0500 |
commit | e7d49dc909623c0618b3e5cfaecb09fb0b38e1fa (patch) | |
tree | 4add69736605b558301ea6d4fc4e99570be29826 /src/nvim/getchar.c | |
parent | fa9b057d356edb9de7c778d62aed8d2451de56fb (diff) | |
download | rneovim-e7d49dc909623c0618b3e5cfaecb09fb0b38e1fa.tar.gz rneovim-e7d49dc909623c0618b3e5cfaecb09fb0b38e1fa.tar.bz2 rneovim-e7d49dc909623c0618b3e5cfaecb09fb0b38e1fa.zip |
vim-patch:8.0.1786: no test for 'termwinkey'
Problem: No test for 'termwinkey'.
Solution: Add a test. Make feedkeys() handle terminal_loop() returning
before characters are consumed.
https://github.com/vim/vim/commit/b2ac14c0b5e23f8ab97c5c784bcd83e13ba8ded3
Diffstat (limited to 'src/nvim/getchar.c')
-rw-r--r-- | src/nvim/getchar.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index f582670141..b82839103f 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -1562,7 +1562,7 @@ int vpeekc(void) { if (old_char != -1) return old_char; - return vgetorpeek(FALSE); + return vgetorpeek(false); } /* @@ -1615,20 +1615,20 @@ vungetc ( /* unget one character (can only be done once!) */ /// Also stores the result of mappings. /// Also used for the ":normal" command. /// 3. from the user -/// This may do a blocking wait if "advance" is TRUE. +/// This may do a blocking wait if "advance" is true. /// -/// if "advance" is TRUE (vgetc()): +/// if "advance" is true (vgetc()): /// Really get the character. /// KeyTyped is set to TRUE in the case the user typed the key. /// KeyStuffed is TRUE if the character comes from the stuff buffer. -/// if "advance" is FALSE (vpeekc()): +/// if "advance" is false (vpeekc()): /// Just look whether there is a character available. /// Return NUL if not. /// /// When `no_mapping` (global) is zero, checks for mappings in the current mode. /// Only returns one byte (of a multi-byte character). /// K_SPECIAL and CSI may be escaped, need to get two more bytes then. -static int vgetorpeek(int advance) +static int vgetorpeek(bool advance) { int c, c1; int keylen; @@ -1721,7 +1721,7 @@ static int vgetorpeek(int advance) // flush all input c = inchar(typebuf.tb_buf, typebuf.tb_buflen - 1, 0L); // If inchar() returns TRUE (script file was active) or we - // are inside a mapping, get out of insert mode. + // are inside a mapping, get out of Insert mode. // Otherwise we behave like having gotten a CTRL-C. // As a result typing CTRL-C in insert mode will // really insert a CTRL-C. @@ -2324,7 +2324,7 @@ static int vgetorpeek(int advance) } /* for (;;) */ } /* if (!character from stuffbuf) */ - /* if advance is FALSE don't loop on NULs */ + // if advance is false don't loop on NULs } while (c < 0 || (advance && c == NUL)); /* |