ctrl - f
vim is flickering when scrolled using ctrl-f
i tried using vim -u NONE still same issue
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
OS: Windows 11
Terminal: alacritty
shell: nushell
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Try let &t_ut=''
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@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.![]()
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.![]()
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.![]()
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.![]()
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.![]()
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.![]()
@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.![]()
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.![]()
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.![]()
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.![]()
@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.![]()
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.![]()
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.![]()
@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.![]()
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.![]()
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.![]()
:split
:vsplit
:botright resize 99
:vert resize 99
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
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.![]()
@mattn the scroll issue is resolved but the cursor is still flickering
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
I tried Alacritty for a while, and it doesn't seem to render split windows correctly in the first place. Could you try reproducing this issue on a different terminal emulator (e.g. Windows Terminal, WezTerm) to rule out an Alacritty-specific rendering problem?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@mattn I've tried both windows terminal and wezterm the issue still persists even though it is minute compared to alacritty.
https://github.com/user-attachments/assets/2fd7f0ab-f5f8-45f8-9bd3-4477ed28214f
Neovim doesnt do this
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@chrnz008 Could you share more details so we can reproduce the cursor flickering?
vim --version | head -3)$TERM value? (echo $TERM)vim -u NONEset novisualbell or set t_vb= make any difference?set guicursor? or set t_SI? t_EI? t_SR?)—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
echo $TERM : screen-256colorMinimal steps to reproduce:
Hold ESC key
Cursor flickers?
above steps
but vim -u NONE has no issue but it is there with after set nocp(with vim -u NONE) or vim --clean
6. no
7. a:block-blinkon0 but the issue does occur without defaults too
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
This is expected behavior. When 'compatible' is off (which happens automatically when a vimrc exists), 'ttimeout' is turned on. This means Vim waits for 'ttimeoutlen' milliseconds after ESC to check if it's part of a key code sequence (e.g. <Esc>[A for arrow keys). If 'ttimeoutlen' is -1 (the default), it falls back to 'timeoutlen' (1000ms), which causes a noticeable delay and cursor redraw on each ESC press.
Try adding this to your vimrc:
set timeout set ttimeoutlen=100
This may help reduce the flickering.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Note that vim --clean loads defaults.vim, which sets ttimeoutlen=100. With this short timeout, the flickering should not be noticeable. Could you double-check whether the issue actually reproduces with vim --clean?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Note that
vim --cleanloadsdefaults.vim, which setsttimeoutlen=100. With this short timeout, the flickering should not be noticeable. Could you double-check whether the issue actually reproduces withvim --clean?
yes it does
Try adding this to your vimrc:
set timeout
set ttimeoutlen=100
this isn't solving the issue
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@chrnz008 I confirmed that the cursor flickering does not reproduce with vim --clean on my end (i.e., when defaults.vim is loaded). However, I'm unable to reproduce the issue on my machine at all, so I need your help to narrow it down.
Could you please bisect which part of defaults.vim is responsible? Copy sections from defaults.vim (located at $VIMRUNTIME/defaults.vim) into your vimrc piece by piece and test after each addition. For example:
Start with just this in your vimrc and test:
set nocompatible set ttimeout set ttimeoutlen=100
If that doesn't fix it, add more settings from defaults.vim one by one (e.g. set display=truncate, set scrolloff=5, set mouse=a, syntax on, filetype plugin indent on, etc.) and test after each addition.
Report back which specific line(s) make the flickering go away (or not).
This will help us understand whether the issue is related to a specific option or a combination of settings. Thank you!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@mattn the issue starting from line 23 in defaults.vim
" Use Vim settings, rather than Vi settings (much better!). " This must be first, because it changes other options as a side effect. " Avoid side effects when it was already reset. if &compatible set nocompatible endif
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@chrnz008 Sorry, my previous comment was unclear. Let me clarify what I'd like you to try.
We already know that set nocompatible changes behavior — that's expected. The key observation is that vim --clean does not reproduce the flickering on my end, which means some other setting in defaults.vim is preventing it.
So what I'd like you to do is:
set nocompatible (which reproduces the flicker for you).defaults.vim one by one and test after each addition:
set nocompatible " add one of these at a time and test: set ttimeout set ttimeoutlen=100 set display=truncate set scrolloff=5 set nrformats-=octal
--clean behavior).This will help us identify the specific option that fixes the issue. Thank you!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@mattn i've tried as you said but there is no effect.
The key observation is that
vim --cleandoes not reproduce the flickering on my end, which means some other setting indefaults.vimis preventing it.
well i tested vim in another computer (win11) and had the same issue
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@chrnz008 If your vimrc doesn't use a plugin manager or anything that modifies runtimepath/packpath, then copying the entire contents of defaults.vim into your vimrc should produce the same behavior as --clean.
Please try the following:
$VIMRUNTIME/defaults.vim.--clean).If the flickering does NOT stop at step 3, please share your full vimrc.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
3. Confirm that the flickering stops (it should behave the same as `--clean`).
just to clarify vim --clean still produce the flicker for me
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@mattn im not lying !! having wezterm on my system doesnt produce the vim flicker issue alacritty
but it does flicker when i uninstalled it and restarted . i tried several times by restarting without removing the flicker isn't produced !!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@mattn should i open a new issue (i've tested the above procedure multiple times)
here are the steps to reproduce:
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
closing this because it is not consistent across other terminal emulators
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@chrnz008 Did you try Windows Terminal? I had issues with it as well
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@chrnz008 Did you try Windows Terminal? I had issues with it as well
@jclsn the cursor flicker only happens with alacritty as far as i know
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()