[vim/vim] vim is flickering during scroll (Issue #18972)

30 views
Skip to first unread message

charan

unread,
Dec 19, 2025, 12:40:41 PM12/19/25
to vim/vim, Subscribed
chrnz008 created an issue (vim/vim#18972)

Steps to reproduce

ctrl - f

Expected behaviour

vim is flickering when scrolled using ctrl-f
i tried using vim -u NONE still same issue

Version of Vim

VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Dec 15 2025 22:16:40) MS-Windows 64-bit GUI/console version with OLE support Included patches: 1-1984

Environment

OS: Windows 11
Terminal: alacritty
shell: nushell

Logs and stack traces


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18972@github.com>

Mateo Gjika

unread,
Dec 20, 2025, 12:12:49 PM12/20/25
to vim/vim, Subscribed
mateoxh left a comment (vim/vim#18972)

Try let &t_ut=''


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18972/3677967558@github.com>

charan

unread,
Dec 21, 2025, 5:47:27 AM12/21/25
to vim/vim, Subscribed
chrnz008 left a comment (vim/vim#18972)

@mateoxh i ve tried it seems to have no effect
and i actually found that set ttyscroll=3 seems to work
but the cursor is still flickering when there is a long press

https://github.com/user-attachments/assets/594256c8-904f-424e-ba30-4e0ac09e9f19


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18972/3678681736@github.com>

Mateo Gjika

unread,
Dec 21, 2025, 6:37:25 AM12/21/25
to vim/vim, Subscribed
mateoxh left a comment (vim/vim#18972)

Does it happen with other terminal emulators?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18972/3678715094@github.com>

charan

unread,
Dec 21, 2025, 8:13:41 AM12/21/25
to vim/vim, Subscribed
chrnz008 left a comment (vim/vim#18972)

Does it happen with other terminal emulators?

yes , it is happening with windows terminal and wezterm too!!


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18972/3678785073@github.com>

dezza

unread,
Feb 17, 2026, 10:30:59 PMFeb 17
to vim/vim, Subscribed
dezza left a comment (vim/vim#18972)

Have you tried a regular bash as starting shell, newer builds? tried building your own build with minimal features?

Regarding last video is it the cursor blinking you mean? I do see the full redraw flickering in first video, but I've never encountered this in terminal vim - I think its more likely to be another layer.

Try with windows terminal or mintty which both have different backends iirc, be sure to test just bash.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18972/3918350241@github.com>

charan

unread,
Feb 19, 2026, 8:43:02 AMFeb 19
to vim/vim, Subscribed
chrnz008 left a comment (vim/vim#18972)

@dezza

Have you tried a regular bash as starting shell, newer builds? tried building your own build with minimal features?

Regarding last video is it the cursor blinking you mean? I do see the full redraw flickering in first video, but I've never encountered this in terminal vim - I think its more likely to be another layer.

Try with windows terminal or mintty which both have different backends iirc, be sure to test just bash.

i've already tried all of them (except custom builds) it is not a shell or terminal issue


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18972/3927391604@github.com>

dezza

unread,
Feb 19, 2026, 9:15:23 AMFeb 19
to vim/vim, Subscribed
dezza left a comment (vim/vim#18972)

i've already tried all of them (except custom builds) it is not a shell or terminal issue

Then someone on same OS must be able to reproduce.

Can you? On a different machine?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18972/3927564387@github.com>

charan

unread,
Feb 19, 2026, 9:35:23 AMFeb 19
to vim/vim, Subscribed
chrnz008 left a comment (vim/vim#18972)

@dezza well i don't have another windows machine
i just install vim.vim using winget
and here is my config (i dont do anything with my os except mapping caps to ctrl)
vimrc

the issue is not occurring in neovim or vim on wsl


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18972/3927677934@github.com>

dezza

unread,
Feb 19, 2026, 9:43:51 AMFeb 19
to vim/vim, Subscribed
dezza left a comment (vim/vim#18972)

I believe winget installs it in some kind of sandbox, but its a long time since I tried it. You could try to look into it.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18972/3927728237@github.com>

charan

unread,
Feb 20, 2026, 9:25:41 AMFeb 20
to vim/vim, Subscribed
chrnz008 left a comment (vim/vim#18972)

Update :
ive tried it in another windows 11 machine i can still see the statusline flicker with ctrl-f


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18972/3935169344@github.com>

dezza

unread,
Feb 20, 2026, 11:12:33 AMFeb 20
to vim/vim, Subscribed
dezza left a comment (vim/vim#18972)

did you try regular installer https://github.com/vim/vim-win32-installer/releases/download/v9.2.0033/gvim_9.2.0033_x64.exe


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18972/3935788395@github.com>

charan

unread,
Feb 20, 2026, 9:17:33 PMFeb 20
to vim/vim, Subscribed
chrnz008 left a comment (vim/vim#18972)

@dezza yes there is no difference (and sometimes vim.exe is not getting registered to path if i use regular installer)


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18972/3937944874@github.com>

mattn

unread,
Feb 20, 2026, 9:25:36 PMFeb 20
to vim/vim, Subscribed
mattn left a comment (vim/vim#18972)

Which plugins do you use?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18972/3937956085@github.com>

charan

unread,
Feb 20, 2026, 9:27:57 PMFeb 20
to vim/vim, Subscribed
chrnz008 left a comment (vim/vim#18972)
Plug 'Konfekt/filepicker.vim' "use yazi as a file manager
Plug 'christoomey/vim-tmux-navigator'
Plug 'chrnz008/gruber.vim' "colorscheme
Plug 'chrnz008/schizo.vim' "utilities
Plug 'jiangmiao/auto-pairs'
Plug 'tpope/vim-surround'

the issue is reproducible even without config


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18972/3937958828@github.com>

charan

unread,
Mar 17, 2026, 11:35:04 AM (14 hours ago) Mar 17
to vim/vim, Subscribed
chrnz008 left a comment (vim/vim#18972)

@mattn update!! the issue is not appearing when im splitting windows

https://github.com/user-attachments/assets/d6af81ae-2f74-4d03-bea5-05797127ea5a


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18972/4075897409@github.com>

dezza

unread,
Mar 17, 2026, 12:55:25 PM (13 hours ago) Mar 17
to vim/vim, Subscribed
dezza left a comment (vim/vim#18972)

Try maximizing the window as much as possible (so 1 line is left for the others).


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18972/4076475393@github.com>

charan

unread,
Mar 17, 2026, 1:05:47 PM (13 hours ago) Mar 17
to vim/vim, Subscribed
chrnz008 left a comment (vim/vim#18972)

Try maximizing the window as much as possible (so 1 line is left for the others).

I'm sorry i did not understand what do you mean


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18972/4076564003@github.com>

dezza

unread,
Mar 17, 2026, 1:17:23 PM (12 hours ago) Mar 17
to vim/vim, Subscribed
dezza left a comment (vim/vim#18972)
:split
:vsplit
:botright resize 99
:vert resize 99

IMG_4509.jpeg (view on web)


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18972/4076645208@github.com>

mattn

unread,
Mar 17, 2026, 7:31:43 PM (6 hours ago) Mar 17
to vim/vim, Subscribed
mattn left a comment (vim/vim#18972)

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.

diff --git a/src/screen.c b/src/screen.c
index 48261009f..921399163 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -3804,7 +3804,7 @@ win_do_lines(
 	    && wp->w_width == topframe->fr_width)
     {
 	if (!no_win_do_lines_ins)
-	    screenclear();	    // will set wp->w_lines_valid to 0
+	    redraw_as_cleared();    // don't clear the screen to avoid flicker
 	return FAIL;
     }

Could you please try this patch?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18972/4078651048@github.com>

Reply all
Reply to author
Forward
0 new messages