]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.2.0387: DECRQM request may leave stray chars in terminal v9.2.0387
authorHirohito Higashi <h.east.727@gmail.com>
Tue, 21 Apr 2026 20:46:12 +0000 (20:46 +0000)
committerChristian Brabandt <cb@256bit.org>
Tue, 21 Apr 2026 21:03:25 +0000 (21:03 +0000)
commitcee8fd73eb54a3196ac3cc2292a0e6910aeaff75
treee583dd5e1ccce0bb675f4d7fe4b736295bc57fec
parent2ea4a7c3b73468683249fe194707c8d7e67ecdb3
patch 9.2.0387: DECRQM request may leave stray chars in terminal

Problem:  Sending DECRQM from handle_version_response() caused DECRPM
          responses to arrive during user input processing, leaving
          bytes in typebuf when clear_showcmd() ran.  This made
          visual-mode showcmd (e.g. "7" line count after V<C-D><C-D>)
          intermittently disappear, failing many screendump tests on CI.
Solution: Move DECRQM request out of handle_version_response() and send
          it at startup via may_req_decrqm(), following the existing
          may_req_termresponse() and may_req_bg_color() pattern.
          Add TPR_DECRQM property set per terminal from the DA2 reply,
          and route DECRQM sends through a may_req_decrqm() helper using
          the termrequest_T pattern, skipping terminals known to
          mishandle it (Foxe Chen, Hirohito Higashi).

fixes:  #19852
closes: #19938

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Hirohito Higashi <h.east.727@gmail.com>
Co-Authored-By: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/doc/builtin.txt
src/main.c
src/proto/term.pro
src/term.c
src/testdir/test_termcodes.vim
src/version.c