Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flickering behavior due to redrawing #23

Closed
wookayin opened this issue Jan 27, 2020 · 12 comments · Fixed by #66
Closed

Flickering behavior due to redrawing #23

wookayin opened this issue Jan 27, 2020 · 12 comments · Fixed by #66

Comments

@wookayin
Copy link

This is a fantastic plugin -- great idea, I like it pretty much.

One small thing that annoys me is that, whenever I scroll (e.g. press j many times) the buffer, all the buffer contents seem to be redrawn and because of this the vim screen flickers. Any solution to this?

I am using neovim 0.4.3 (linux), TERM=xterm-256color with termguicolors enabled.

@wookayin
Copy link
Author

Additional information: Without floating windows (i.e. g:context_presenter = 'preview'), it works well without flickering.

@wellle
Copy link
Owner

wellle commented Jan 27, 2020

@wookayin: Thanks! Yeah I wish we wouldn't need the hard redraw. There's a redraw issue in Neovim's floating window implementation, I opened an issue about it here: neovim/neovim#11597

As a workaround I added a hard redraw. If you want to try this plugin without that redraw, you try use this branch:
https://github.com/wellle/context.vim/compare/23-nvim-no-redraw

@wookayin
Copy link
Author

Thanks @wellle for the information; it is super helpful. Temporarily disabling redraw (:mode) makes me feel more comfortable, and I would work around with this. Look forward to the upstream neovim issue being fixed.

@syphar
Copy link

syphar commented Feb 3, 2020

I also switched to the version without redraw because of the flickering and performance.

(and yes, sometimes there are small rendering issues / remains of the closed context, but that annoys me less than the performance / flicker)

edit:
i was wrong, switched back again.

@exdeniz
Copy link

exdeniz commented Feb 9, 2020

I have this issues on start nvim from tmux. Switching to 23-nvim-no-redraw and problem solved.

@wookayin
Copy link
Author

Hey @wellle, would you want to make this feature merged to master but actually configurable by some g: variable?

@wellle
Copy link
Owner

wellle commented Mar 16, 2020

Yes that sounds like a good idea 👍

@wellle
Copy link
Owner

wellle commented Mar 24, 2020

@wookayin @sirupsen @lervag @jasonkena @exdeniz: I added a setting in #66 so you can disable the redraw on updated master now. Add this to your vimrc:

let g:context_nvim_no_redraw = 1

@lervag
Copy link

lervag commented Mar 24, 2020

I still experience quite severe flickering, both with and without this setting.

@jasonkena
Copy link

@lervag @wellle Pretty sure it should be
let g:context_nvim_no_redraw = 1

@lervag
Copy link

lervag commented Mar 25, 2020

Ah, yes. My brain was doing something else, sorry. With that, I can confirm there is no flickering, but I do see the artifacts. :\

@wellle
Copy link
Owner

wellle commented Mar 25, 2020

@jasonkena: Thanks, fixed above 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants