mirror of
https://github.com/neovim/neovim.git
synced 2025-10-06 09:56:31 +00:00
vim-patch:8.1.0840: getchar(0) never returns a character in the terminal
Problem: getchar(0) never returns a character in the terminal.
Solution: Call wait_func() at least once.
12dfc9eef1
This commit is contained in:
@@ -253,6 +253,16 @@ func Test_peek_and_get_char()
|
|||||||
call timer_stop(intr)
|
call timer_stop(intr)
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_getchar_zero()
|
||||||
|
call timer_start(20, {id -> feedkeys('x', 'L')})
|
||||||
|
let c = 0
|
||||||
|
while c == 0
|
||||||
|
let c = getchar(0)
|
||||||
|
sleep 10m
|
||||||
|
endwhile
|
||||||
|
call assert_equal('x', nr2char(c))
|
||||||
|
endfunc
|
||||||
|
|
||||||
func Test_ex_mode()
|
func Test_ex_mode()
|
||||||
" Function with an empty line.
|
" Function with an empty line.
|
||||||
func Foo(...)
|
func Foo(...)
|
||||||
|
Reference in New Issue
Block a user