mirror of
https://github.com/neovim/neovim.git
synced 2024-12-29 14:41:06 -07:00
vim-patch:8.1.0851: feedkeys() with "L" does not work properly
Problem: feedkeys() with "L" does not work properly.
Solution: Do not set typebuf_was_filled when using "L". (Ozaki Kiichi,
closes vim/vim#3885)
8d4ce56a19
This commit is contained in:
parent
e7d49dc909
commit
3a3fb08602
@ -241,15 +241,15 @@ void nvim_feedkeys(String keys, String mode, Boolean escape_csi)
|
||||
keys_esc = keys.data;
|
||||
}
|
||||
ins_typebuf((char_u *)keys_esc, (remap ? REMAP_YES : REMAP_NONE),
|
||||
insert ? 0 : typebuf.tb_len, !typed, false);
|
||||
insert ? 0 : typebuf.tb_len, !typed, false);
|
||||
if (vgetc_busy) {
|
||||
typebuf_was_filled = true;
|
||||
}
|
||||
|
||||
if (escape_csi) {
|
||||
xfree(keys_esc);
|
||||
}
|
||||
|
||||
if (vgetc_busy) {
|
||||
typebuf_was_filled = true;
|
||||
}
|
||||
if (execute) {
|
||||
int save_msg_scroll = msg_scroll;
|
||||
|
||||
|
@ -52,7 +52,7 @@ if has('timers')
|
||||
au CursorHoldI * let g:triggered += 1
|
||||
set updatetime=500
|
||||
call job_start(has('win32') ? 'cmd /c echo:' : 'echo',
|
||||
\ {'exit_cb': {j, s -> timer_start(1000, 'ExitInsertMode')}})
|
||||
\ {'exit_cb': {-> timer_start(1000, 'ExitInsertMode')}})
|
||||
call feedkeys('a', 'x!')
|
||||
call assert_equal(1, g:triggered)
|
||||
unlet g:triggered
|
||||
|
@ -287,7 +287,7 @@ func Test_map_timeout_with_timer_interrupt()
|
||||
set timeout timeoutlen=200
|
||||
|
||||
func ExitCb(job, status)
|
||||
let g:timer = timer_start(1, {_ -> feedkeys("3\<Esc>", 't')})
|
||||
let g:timer = timer_start(1, {-> feedkeys("3\<Esc>", 't')})
|
||||
endfunc
|
||||
|
||||
call job_start([&shell, &shellcmdflag, 'echo'], {'exit_cb': 'ExitCb'})
|
||||
|
@ -254,15 +254,14 @@ func Test_peek_and_get_char()
|
||||
endfunc
|
||||
|
||||
func Test_getchar_zero()
|
||||
if has('win32')
|
||||
if has('win32') && !has('gui_running')
|
||||
" Console: no low-level input
|
||||
" GUI: somehow doesn't work
|
||||
return
|
||||
endif
|
||||
|
||||
" Measure the elapsed time to avoid a hang when it fails.
|
||||
let start = reltime()
|
||||
let id = timer_start(20, {id -> feedkeys('x', 'L')})
|
||||
let id = timer_start(20, {-> feedkeys('x', 'L')})
|
||||
let c = 0
|
||||
while c == 0 && reltimefloat(reltime(start)) < 0.2
|
||||
let c = getchar(0)
|
||||
|
Loading…
Reference in New Issue
Block a user