ojroques / vim-oscyank

A Vim plugin to copy text through SSH with OSC52
BSD 2-Clause "Simplified" License
615 stars 38 forks source link

Cannot yank more than 180 characters #20

Closed croizier closed 2 years ago

croizier commented 2 years ago

Hi,

In my configuration, yanking to the system clipboard works fine if the text contains at most 180 characters, but it fails if the text contains at least 181 characters. Same problem with both OSCYank and OSCYankReg, and both VIM 7.4 and Neovim 0.5.1.

VIM always displays the message that xxx bytes were copied. This is on Centos7, in tmux 1.8, displayed by mintty 3.4.6 (provided by Git for Windows). Pasting to the Windows clipboard always work when I select any amount of text with the mouse in the tmux window.

ojroques commented 2 years ago

Hello! Maybe this is related to your issue:

https://sunaku.github.io/tmux-yank-osc52.html

It seems it is an issue from tmux. I didn't read the whole article yet but I'll take a look.

ojroques commented 2 years ago

It seems that it is an issue from tmux indeed. Reading the article, you can fix tmux directly with this patch:

https://www.mail-archive.com/tmux-users%40lists.sourceforge.net/msg05950.html

Otherwise maybe the fix was integrated in later versions. I'm not familiar with tmux so maybe you should check. But there's nothing I can do on the plugin side unfortunately.

croizier commented 2 years ago

The workaround didn't work but the bug is in tmux instead of vim-oscyank anyway so we can close this issue. The information in here will help those who hit the same problem.