refactor: allow us to process a child queue only while waiting on input

This commit is contained in:
Björn Linse
2019-09-06 20:10:56 +02:00
parent fa90f6cdaa
commit e6b7613e89
12 changed files with 69 additions and 78 deletions

View File

@@ -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