Problem: tests: Test_suspend() may fail because of keyprotocol query
Solution: Disable keyprotocol and unset t_RK very early so that the
inner Vim does not query it (Vladimír Marek)
The nested Vim can send a keyprotocol query during startup. If the terminal
response arrives at the wrong time, the nested Vim may not consume it and the
response can be written to the inner terminal, leaving characters such as 4;2m
after the shell prompt when the test later suspends Vim.
The previous command tried to avoid that with -c 'set keyprotocol=', but -c
commands are applied too late. Use --cmd 'set t_RK= keyprotocol=' so the
inner Vim disables the query before startup can send it.
closes: #20570
Signed-off-by: Vladimír Marek <vlmarek13@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
call term_sendkeys(buf, v:progpath
\ . " --clean -X"
- \ . " -c 'set nu keyprotocol='"
+ \ . " --cmd 'set t_RK= keyprotocol='"
+ \ . " -c 'set nu'"
\ . " -c 'call setline(1, \"foo\")'"
\ . " Xfoo\<CR>")
" Cursor in terminal buffer should be on first line in spawned vim.
call term_sendkeys(buf, v:progpath
\ . " --clean -X"
- \ . " -c 'set nu keyprotocol='"
+ \ . " --cmd 'set t_RK= keyprotocol='"
+ \ . " -c 'set nu'"
\ . " -c 'let g:count = 0'"
\ . " -c 'au VimSuspend * let g:count += 1'"
\ . " -c 'au VimResume * let g:count += 1'"
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 693,
/**/
692,
/**/