mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge pull request #9868 from mhinz/vim-8.1.1118
vim-patch:8.1.1118: a couple of conditions are hard to understand
This commit is contained in:
commit
2a6ccfccac
@ -2270,18 +2270,25 @@ static int vgetorpeek(int advance)
|
|||||||
// that has a <Nop> RHS.
|
// that has a <Nop> RHS.
|
||||||
timedout = false;
|
timedout = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long wait_time = 0;
|
||||||
|
|
||||||
|
if (advance) {
|
||||||
|
if (typebuf.tb_len == 0
|
||||||
|
|| !(p_timeout || (p_ttimeout && keylen == KEYLEN_PART_KEY))) {
|
||||||
|
// blocking wait
|
||||||
|
wait_time = -1L;
|
||||||
|
} else if (keylen == KEYLEN_PART_KEY && p_ttm >= 0) {
|
||||||
|
wait_time = p_ttm;
|
||||||
|
} else {
|
||||||
|
wait_time = p_tm;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
wait_tb_len = typebuf.tb_len;
|
wait_tb_len = typebuf.tb_len;
|
||||||
c = inchar(typebuf.tb_buf + typebuf.tb_off + typebuf.tb_len,
|
c = inchar(typebuf.tb_buf + typebuf.tb_off + typebuf.tb_len,
|
||||||
typebuf.tb_buflen - typebuf.tb_off - typebuf.tb_len - 1,
|
typebuf.tb_buflen - typebuf.tb_off - typebuf.tb_len - 1,
|
||||||
!advance
|
wait_time);
|
||||||
? 0
|
|
||||||
: ((typebuf.tb_len == 0
|
|
||||||
|| !(p_timeout || (p_ttimeout
|
|
||||||
&& keylen == KEYLEN_PART_KEY)))
|
|
||||||
? -1L
|
|
||||||
: ((keylen == KEYLEN_PART_KEY && p_ttm >= 0)
|
|
||||||
? p_ttm
|
|
||||||
: p_tm)));
|
|
||||||
|
|
||||||
if (i != 0)
|
if (i != 0)
|
||||||
pop_showcmd();
|
pop_showcmd();
|
||||||
|
Loading…
Reference in New Issue
Block a user