macvim icon indicating copy to clipboard operation
macvim copied to clipboard

constant flickering when entering normal mode commands

Open fs111 opened this issue 2 years ago • 8 comments

Steps to reproduce

Whenever I do any normal mode command in the terminal the screen is flickering while it is being redrawn. This only started happening after the latest upgrade.

Attached is a scaled down gif that shows the behavior.

Screen Recording 2023-02-10 at 13 37 31

Expected behaviour

no flickering at all

Version of Vim and architecture

VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Feb 7 2023 12:17:42) macOS version - x86_64 Included patches: 1-1276 Compiled by GitHub Actions Huge version with MacVim GUI. Features included (+) or not (-):

Environment

macOS Monterey, X86_64 (Intel) Terminal: iterm2 Build 3.4.19 xterm-256color GNU bash, version 5.2.9(1)-release (x86_64-apple-darwin21.3.0)

How MacVim was installed

official installer

Logs and stack traces

No response

Vim configuration where issue is reproducable

https://github.com/fs111/dotvim/blob/master/vimrc

Issue has been tested with given configuration

  • [ ] by running MacVim.app from GUI macOS interface
  • [ ] by running vim/gvim/etc installed by MacVim
  • [X] by running other versions of vim (e.g. /usr/bin/vim)

Issue has been tested with no configuration

  • [ ] by running mvim --clean (or gvim, supplied by MacVim distribution)
  • [ ] by running vim --clean (in terminal, supplied by MacVim distribution)
  • [ ] by running vim --clean (in terminal, other suppliers, e.g. /usr/bin/vim)

Other conditions

  • [ ] The both Homebrew packages "vim" and "macvim" are installed

fs111 avatar Feb 10 '23 12:02 fs111

meh, I did build of upstream vim and the problem is there too. The problem must have started in between the current and latest upstream patches. Fun..

fs111 avatar Feb 10 '23 13:02 fs111

Hmm, I'm not quite seeing the flickering. I only tested on Apple Terminal and iTerm 3.5.0beta9 instead of iTerm 3.4.19 but I don't imagine the minor version difference matters.

I didn't test your vimrc fully because I didn't want to install all the plugins. I think it could be useful (you would get the same feedbacks as well if you file an issue at upstream Vim itself which you probably should do if you confirmed that this is an upstream issue) if you can isolate which command / plugin causes the flickering, since most people won't want to do the binary search themselves. (It would at least be useful to confirm that it's a plugin, because I don't think the flickering happens without the installed plugins)

ychin avatar Feb 10 '23 20:02 ychin

Any update on this @fs111 ? I'm still not seeing this flickering so I'm wondering if you are still seeing this.

ychin avatar Feb 22 '23 01:02 ychin

@ychin ah, sorry no. Life got in the way. I will try to find some time to get to the bottom of it in the coming days

fs111 avatar Feb 22 '23 09:02 fs111

@ychin Looks like it is the combination of the latest vim and https://github.com/gelguy/wilder.nvim I tried it with neovim and that works fine. I will check with the plugin author if something can be done at their end.

fs111 avatar Feb 23 '23 10:02 fs111

This may not be what you want to hear but I tried out wilder with a replicated setup similar to your vimrc and didn't quite see the flickering, in GUI, Apple Terminal, and iTerm. I'm using macOS Ventura though. But yeah maybe you may want to see if others have the same issue as you. I wonder if it's some interaction with some other plugins or some Vim features etc.

ychin avatar Feb 24 '23 04:02 ychin

Hi @fs111 sorry I lied! I managed to repro it. I think I just didn't set it up properly. I did a quick Git bisect and found the issue was Vim v9.0.0993 (89469d157). I haven't taken a close look yet but seems like something changed in that commit where Vim tends to prefer to do full redraws which is why the screen flickers.

May want to follow up with either Vim or the plugin to see if there is a way to resole this.

ychin avatar Feb 25 '23 01:02 ychin

Thank you @ychin for spending the time. I will open an issue with the wilder project and see what they have to say.

fs111 avatar Feb 25 '23 20:02 fs111