]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.2.0227: MS-Windows: CSI sequences may be written to screen v9.2.0227
authorYasuhiro Matsumoto <mattn.jp@gmail.com>
Sun, 22 Mar 2026 17:05:14 +0000 (17:05 +0000)
committerChristian Brabandt <cb@256bit.org>
Sun, 22 Mar 2026 17:05:14 +0000 (17:05 +0000)
commitaeb716ea77d4fbb43cf3e2e787d4b1dd5ea8366a
tree65f217461232dcd9444652c30d2970022e2fd085
parent48137e4e48f103f27b4486e9dea18f5d073972fe
patch 9.2.0227: MS-Windows: CSI sequences may be written to screen

Problem:  MS-Windows: CSI sequences may be written to screen
          (after v9.2.0200).
Solution: Move the CSI parsing and skipping logic outside of the USE_VTP
          guard in mch_write() so that sequences are always consumed
          even if VTP is inactive (Yasuhiro Matsumoto).

After v9.2.0200 added send_decrqm_modes(), running vim -u NONE -U NONE
-N on Windows displays raw ESC[?2026$p on screen. This is because
USE_VTP is false when termguicolors is off and t_colors < 256, and the
CSI skip logic in mch_write() was inside the if (USE_VTP) block, so
s/len were never advanced and the escape sequence leaked out as plain
text.

Move the CSI parsing/skipping outside the USE_VTP guard so sequences are
always consumed. Only the vtp_printf() pass-through for DECSCUSR (q)
remains conditional on USE_VTP.

related: #19755
closes:  #19762

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/os_win32.c
src/version.c