The flicker is caused by screenclear() in win_do_lines() (screen.c). When the scroll amount is large (Rows - line_count < 5) and the window spans the full width, screenclear() clears the entire terminal screen before redrawing all lines. The blank screen is visible as flicker. This is why the flickering occurs during scrolling.
With a vertical split, wp->w_width != topframe->fr_width, so this condition (screen.c:3803) is skipped and the scroll region path is used instead, which shifts content in-place without blanking.
The fix is to replace screenclear() with redraw_as_cleared(). screenclear() both invalidates the internal ScreenLines[] buffer and sends T_CL to clear the terminal. redraw_as_cleared() only invalidates the buffer. Since this path returns FAIL, the caller redraws all lines via win_line() which overwrites each character in place, so the screen is never blank.
closes #18972
https://github.com/vim/vim/pull/19732
(1 file)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@chrisbra The CI failure (Test_message_more_scrollback in linux (huge, gcc, no_x11_wl)) is not caused by this PR. It was introduced by commit c4d2122 (patch 9.2.0192: not correctly recognizing raw key codes). Confirmed by bisect and by reproducing the same failure on the latest master.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()