zellij-org / zellij

A terminal workspace with batteries included
https://zellij.dev
MIT License
21.19k stars 643 forks source link

Text copying not working #1033

Closed matmoscicki closed 2 years ago

matmoscicki commented 2 years ago

Basic information

zellij --version: zellij 0.24.0 tput lines: 65 tput cols: 207 uname -av or ver(Windows): Linux szary-VirtualBox 5.4.0-48-generic #52~18.04.1-Ubuntu SMP Thu Sep 10 12:50:22 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

List of programs you interact with as, PROGRAM --version: output cropped meaningful, for example: mobaXterm v21.5

Further information Copying text does not work as I would expect. After selecting, I get a message that the text was copied, but pasting with Shift+Insert pastes me what was previously in the clipboard. ( https://gifyu.com/image/Sb1ae ). It may be related to some mobaXterm settings, but it does not work only in Zellij (tmux has no problem).

jaeheonji commented 2 years ago

Hi, @matmoscicki!

I saw the GIF you uploaded. First of all, I am not a user of mobaXterm, so this may not be the correct answer. Maybe, this is due to the difference between the PRIMARY selection and the clipboard.

From the GIF view, it looks like you are using the copy-on-select feature in mobaXterm . And probably, the data copied through this feature goes to PRIMARY selection.

zellij has its own copy-on-select feature, which only copies data to the clipboard. (For reference, we are currently developing a function to support various clipboards. #1022)

Perhaps the data pasted through Shift+Insert in mobaXterm comes from PRIMARY selection.

EDIT: I did a search and saw an option to disable primary selection in the mobaXterm configuration. I don't know if this option is to use the system clipboard as a default instead of primary selection, but if it is correct, copy/paste will work normally in zellij.

tlinford commented 2 years ago

@matmoscicki it could be that mobaXterm does not support the osc52 instruction we use by default to handle copying. This can be worked around in a couple of ways:

a-kenji commented 2 years ago

This should be addressed now.