patch 8.2.2246: cursor keys not recognized at the hit-Enter prompt
Problem: Cursor keys not recognized at the hit-Enter prompt after executing
an external command.
Solution: Change the codes for the extra cursor keys. (closes #7562)
Tune the delays to avoid test flakyness.
diff --git a/src/testdir/test_terminal3.vim b/src/testdir/test_terminal3.vim
index 75882f1..eaf37e6 100644
--- a/src/testdir/test_terminal3.vim
+++ b/src/testdir/test_terminal3.vim
@@ -101,7 +101,7 @@
let buf = RunVimInTerminal('-S XtermPopup', #{rows: 15})
call TermWait(buf, 100)
call term_sendkeys(buf, ":call OpenTerm(0)\<CR>")
- call TermWait(buf, 100)
+ call TermWait(buf, 500)
call term_sendkeys(buf, ":\<CR>")
call TermWait(buf, 100)
call term_sendkeys(buf, "\<C-W>:echo getwinvar(g:winid, \"&buftype\") win_gettype(g:winid)\<CR>")
@@ -111,7 +111,7 @@
call VerifyScreenDump(buf, 'Test_terminal_popup_2', {})
call term_sendkeys(buf, ":call OpenTerm(1)\<CR>")
- call TermWait(buf, 150)
+ call TermWait(buf, 500)
call term_sendkeys(buf, ":set hlsearch\<CR>")
call TermWait(buf, 100)
call term_sendkeys(buf, "/edit\<CR>")
@@ -138,7 +138,7 @@
call TermWait(buf, 50)
call term_sendkeys(buf, ":q\<CR>")
- call TermWait(buf, 150) " wait for terminal to vanish
+ call TermWait(buf, 250) " wait for terminal to vanish
call StopVimInTerminal(buf)
call delete('Xtext')
@@ -309,6 +309,7 @@
let buf = RunVimInTerminal('', {})
call term_sendkeys(buf, ":set nocompatible\<CR>")
+ call term_sendkeys(buf, ":set timeoutlen=20\<CR>")
let keys = ["\<F1>", "\<F2>", "\<F3>", "\<F4>", "\<F5>", "\<F6>", "\<F7>",
\ "\<F8>", "\<F9>", "\<F10>", "\<F11>", "\<F12>", "\<Home>",
@@ -325,7 +326,7 @@
call term_sendkeys(buf, "i")
for i in range(len(keys))
call term_sendkeys(buf, "\<C-U>\<C-K>" .. keys[i])
- call WaitForAssert({-> assert_equal(output[i], term_getline(buf, 1))})
+ call WaitForAssert({-> assert_equal(output[i], term_getline(buf, 1))}, 200)
endfor
let keypad_keys = ["\<k0>", "\<k1>", "\<k2>", "\<k3>", "\<k4>", "\<k5>",
@@ -340,7 +341,7 @@
continue
endif
call term_sendkeys(buf, "\<C-U>" .. keypad_keys[i])
- call WaitForAssert({-> assert_equal(keypad_output[i], term_getline(buf, 1))})
+ call WaitForAssert({-> assert_equal(keypad_output[i], term_getline(buf, 1))}, 100)
endfor
call feedkeys("\<C-U>\<kEnter>\<BS>one\<C-W>.two", 'xt')