Support osc 52 Manipulate Selection Data. #343 #402
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
this pull request need merged after #404
Add option:
vterm-enable-manipulate-selection-data-by-osc52Vterm 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
VTermStringFragmentin 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.