tmux: Get rid of "Not in a mode" error

The copy command should only be executed when not in a mode (i.e.
alternate?). This gets rid of the error message "Not in a mode" when
double/triple clicking inside of vim etc..
This commit is contained in:
2024-10-18 14:52:45 +02:00
parent 37cb526728
commit 012d913901

View File

@@ -54,9 +54,9 @@ bind -n SecondClick1Pane {
} {
copy-mode
send -X select-word
}
send -X pipe-no-clear "xclip -selection primary"
}
}
bind -n TripleClick1Pane {
select-pane -t=
@@ -65,9 +65,9 @@ bind -n TripleClick1Pane {
} {
copy-mode
send -X select-line
}
send -X pipe-no-clear "xclip -selection primary"
}
}
# Scroll up 5 lines when entering copy-mode through the mouse wheel, send 5x`up`
# when the current pane is in alternate mode and discard the `-e` flag passed to