]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.2.0440: MS-Windows: cursor flicker during update_screen() v9.2.0440
authorYasuhiro Matsumoto <mattn.jp@gmail.com>
Mon, 4 May 2026 19:58:27 +0000 (19:58 +0000)
committerChristian Brabandt <cb@256bit.org>
Mon, 4 May 2026 19:58:27 +0000 (19:58 +0000)
commit0c998003bc6ae20e10a6a7362edf52da2eb12019
tree5c1a94462de4b387ab2e1b91026c7a8dcbc40ce0
parent3bfffcc29054faff2dbec2d765317ee09e9ef827
patch 9.2.0440: MS-Windows: cursor flicker during update_screen()

Problem:  MS-Windows: cursor flicker during update_screen()
Solution: Hide the cursor during update_screen() to avoid Windows ConPTY
          flicker (Yasuhiro Matsumoto).

On terminals that do not honor synchronized output mode (e.g. Windows
ConPTY), update_screen() emits cell positioning and content as multiple
Win32 console writes through mch_write(), which the terminal renders as
separate frames.  This shows up as the cursor briefly jumping to column
1 of rows being redrawn, especially during async redraws around the
popup completion menu.

Disable the cursor with cursor_off() at the start of update_screen()
and restore it with cursor_on() at the end, but only when synchronized
output mode is not active.  When it is, the redraw is already atomic
from the terminal's view and hiding the cursor would only add visible
blink with no benefit.

closes: #20121

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