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>