raphamorim / rio

A hardware-accelerated GPU terminal emulator focusing to run in desktops and browsers.
https://raphamorim.io/rio
MIT License
3.56k stars 113 forks source link

Text copy (OSC 52) is broken (tmux, zellij) #276

Closed awoimbee closed 1 year ago

awoimbee commented 1 year ago

Hi, I don't know the intricacies, but when I try to copy text directly from ZSH it works, but from zellij or tmux it doesn't (the clipboard is not updated).

$ rio --version
rioterm 0.0.22
tranzystorekk commented 1 year ago

https://zellij.dev/documentation/faq#copy--paste-isnt-working-how-can-i-fix-this, haven't checked if rio supports OSC 52, but likely not

raphamorim commented 1 year ago

It should have support for OSC 52 (or at least I believe it was implemented https://github.com/raphamorim/rio/blob/15a2afdc83b6afbd33518502f42e63a8b0303b63/rio/src/crosswords/mod.rs#L1657), will mark to take a look on it 👍

raphamorim commented 1 year ago

https://github.com/raphamorim/rio/blob/15a2afdc83b6afbd33518502f42e63a8b0303b63/rio/src/performer/handler.rs#L687-L697

raphamorim commented 1 year ago

@awoimbee what's your TERM value?

awoimbee commented 1 year ago

In rio, echo $TERM prints "rio", in alacritty it's "alacritty". Seems like the issue is OSC52 handling, I tried printf "\033]52;c;Y29weXBhc3RhIQ==\a\n" (from here), it doesn't work in rio. (gnome on wayland, openSUSE Tumbleweed)

raphamorim commented 1 year ago

ah... I know what it is 🤦

raphamorim commented 1 year ago

When I refactored to support multiwindow long time ago I've lost the event handlers, one sec will push the fix.

raphamorim commented 1 year ago

Fixed at main Screenshot 2023-10-09 at 00 13 51