Skip to content

Conversation

@jixiuf
Copy link
Collaborator

@jixiuf jixiuf commented Sep 19, 2020

this pull request need merged after #404

Add option: vterm-enable-manipulate-selection-data-by-osc52

Vterm support copy text to emacs kill ring and system clipboard by using OSC 52.
See https://invisible-island.net/xterm/ctlseqs/ctlseqs.html for more info about OSC 52.
For example: send 'blabla' to kill ring(and clipboard): printf "\033]52;c;$(printf "%s" "blabla" | base64)\a"

tmux can share its copy buffer to terminals bysupporting osc52(like iterm2 xterm),
you can enable this feature for tmux by :
set -g set-clipboard on #osc 52 copy paste share with iterm
set -ga terminal-overrides ',xterm*:XT:Ms=\E]52;%p1%s;%p2%s\007'
set -ga terminal-overrides ',screen*:XT:Ms=\E]52;%p1%s;%p2%s\007'

The clipboard querying/clearing functionality offered by OSC 52 is not implemented here,

And for security reason, this feature is disabled by default."

This feature need the new way of handling strings with a struct VTermStringFragment
in libvterm. You'd better compile emacs-libvterm with cmake -DUSE_SYSTEM_LIBVTERM=no ...
If you don't do that, when the content you want to copied is too long, it would be truncated
by bug of libvterm.

@jixiuf jixiuf force-pushed the tmux-copy-integration-osc52 branch 7 times, most recently from 79b1b2c to 0e5497d Compare September 25, 2020 16:14
@jixiuf jixiuf force-pushed the tmux-copy-integration-osc52 branch from 0e5497d to 963ba33 Compare November 12, 2020 14:55
@jixiuf jixiuf merged commit b992934 into akermu:master Nov 12, 2020
@jixiuf jixiuf deleted the tmux-copy-integration-osc52 branch November 14, 2020 14:46
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 this pull request may close these issues.

1 participant