aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/getchar.c
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2019-09-06 20:10:56 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2019-09-08 15:24:14 +0200
commite6b7613e89cc274198eec014180da6034442b3b6 (patch)
treee7deeaeb8f9b0da7b60f3efe06cde3434650d7d1 /src/nvim/getchar.c
parentfa90f6cdaae800d9bfbc4f28ec04fb7456751dbe (diff)
downloadrneovim-e6b7613e89cc274198eec014180da6034442b3b6.tar.gz
rneovim-e6b7613e89cc274198eec014180da6034442b3b6.tar.bz2
rneovim-e6b7613e89cc274198eec014180da6034442b3b6.zip
refactor: allow us to process a child queue only while waiting on input
Diffstat (limited to 'src/nvim/getchar.c')
-rw-r--r--src/nvim/getchar.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c
index 318b36860e..2469bb5baa 100644
--- a/src/nvim/getchar.c
+++ b/src/nvim/getchar.c
@@ -1532,8 +1532,9 @@ int safe_vgetc(void)
int c;
c = vgetc();
- if (c == NUL)
- c = get_keystroke();
+ if (c == NUL) {
+ c = get_keystroke(NULL);
+ }
return c;
}
@@ -2447,9 +2448,10 @@ int inchar(
char_u dum[DUM_LEN + 1];
for (;; ) {
- len = os_inchar(dum, DUM_LEN, 0L, 0);
- if (len == 0 || (len == 1 && dum[0] == 3))
+ len = os_inchar(dum, DUM_LEN, 0L, 0, NULL);
+ if (len == 0 || (len == 1 && dum[0] == 3)) {
break;
+ }
}
return retesc;
}
@@ -2460,7 +2462,7 @@ int inchar(
// Fill up to a third of the buffer, because each character may be
// tripled below.
- len = os_inchar(buf, maxlen / 3, (int)wait_time, tb_change_cnt);
+ len = os_inchar(buf, maxlen / 3, (int)wait_time, tb_change_cnt, NULL);
}
// If the typebuf was changed further down, it is like nothing was added by