From: Vladimír Marek Date: Sun, 21 Jun 2026 17:45:37 +0000 (+0000) Subject: patch 9.2.0693: tests: Test_suspend() may fail because of keyprotocol query X-Git-Tag: v9.2.0693^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b7582029d3cf5d435eb401eea20faf696ecdcc6;p=thirdparty%2Fvim.git patch 9.2.0693: tests: Test_suspend() may fail because of keyprotocol query 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 Signed-off-by: Christian Brabandt --- diff --git a/src/testdir/test_suspend.vim b/src/testdir/test_suspend.vim index ae05dd21f2..69abeaed6e 100644 --- a/src/testdir/test_suspend.vim +++ b/src/testdir/test_suspend.vim @@ -30,7 +30,8 @@ func Test_suspend() 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\") " Cursor in terminal buffer should be on first line in spawned vim. @@ -80,7 +81,8 @@ func Test_suspend_autocmd() 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'" diff --git a/src/version.c b/src/version.c index 5b34e6a3d7..1bd3fd09bd 100644 --- a/src/version.c +++ b/src/version.c @@ -759,6 +759,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 693, /**/ 692, /**/