From 8b7582029d3cf5d435eb401eea20faf696ecdcc6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Marek?= Date: Sun, 21 Jun 2026 17:45:37 +0000 Subject: [PATCH] patch 9.2.0693: tests: Test_suspend() may fail because of keyprotocol query MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/testdir/test_suspend.vim | 6 ++++-- src/version.c | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) 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, /**/ -- 2.47.3