Fix copying in a session nested in display-popup

This commit is contained in:
2026-05-12 14:39:50 +01:00
parent 1b87770f67
commit c40c2973a7

View File

@@ -32,6 +32,9 @@ if '~/.config/tmux/check-version.sh "<" 3.2' \
'set-option -as terminal-features ",xterm*:Tc"' \
'set-option -as terminal-features ",xterm*:RGB"'
# Declare clipboard (OSC-52) support so tmux emits it for copy-pipe.
set -as terminal-features ',xterm*:clipboard'
# Focus events enabled for terminals that support them
set -g focus-events on
@@ -157,8 +160,10 @@ if -b '[ "$SSH_TTY" != "" ]' \
if -b '[ "`uname`" = "Darwin" ]' \
'bind -T copy-mode-vi y send-keys -X copy-pipe "pbcopy"'
# When not in WSL2 use xsel, when in WSL use win32yank.exe to avoid UI lockups.
if -b '[ "`uname`" != "Darwin" ]' {
if -b '[ "$WSLENV" = "" ]' \
'bind -T copy-mode-vi y send-keys -X copy-pipe "xsel -i --clipboard"' \
'bind -T copy-mode-vi y send-keys -X copy-pipe "win32yank.exe -i -crlf"'
}
source-file ~/.config/tmux/theme.tmux