vim-osc52 icon indicating copy to clipboard operation
vim-osc52 copied to clipboard

Calling SendViaOSC52 Causes Terminal to Flicker

Open AnastasiusVivaldus opened this issue 5 years ago • 4 comments
trafficstars

Thanks for this awesome plugin! After trying X11-forwarding, and other attempts at OSC52, this is the first that seems to really work well across different platforms.

The only question I have concerns the way it causes my terminal to flicker. I had hoped to include it in every yank, but that's not viable because it causes a big flicker each time. Not a massive deal, but if there's an easy fix then that would be appreciated.

AnastasiusVivaldus avatar Sep 02 '20 00:09 AnastasiusVivaldus

Thanks! Try setting lazyredraw in vim and see if it helps. If does not, it might just be terminal-dependent.

fcpg avatar Sep 03 '20 16:09 fcpg

Hello,

I have just pushed a commit that should prevent the flicker; let me know if it works for you too, and I'll close the issue.

fcpg avatar Sep 19 '20 12:09 fcpg

I tried it just now ssh-ing into an AWS microVM (Ubuntu 18) with Vim 8.2 in iTerm2 and, unfortunately, it causes my screen to blank. Here is a screen recording of me doing a simple yank on the relevant lines in my .vimrc

vim-blank

Let me know if there's any debug info I might send to help figure out what's happening here.

Edit: Note: I also tried it just now on my MacBookPro and got the same behavior.

AnastasiusVivaldus avatar Sep 19 '20 17:09 AnastasiusVivaldus

Pushed another commit that adds two options:

  • g:osc52_print: can be 'echo' (default), 'printf' or a vim expression to which the osc52 sequence will be appended;
  • g:osc52_redraw: can be 2 (default: erase and redraw, causes flicker), 1 (redraw without erasing) or 0 (no redraw).

Try tinkering with both options. On my side, I use g:osc52_print = 'print' and g:osc52_redraw = 0, on minTTY and tmux, without issue nor flicker. It is probably very much terminal-dependent.

fcpg avatar Sep 19 '20 18:09 fcpg