File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,9 @@ yank_wo_newline_option="@copy_mode_yank_wo_newline"
21
21
yank_selection_default=" clipboard"
22
22
yank_selection_option=" @yank_selection"
23
23
24
+ yank_action_default=" copy-pipe-and-cancel"
25
+ yank_action_option=" @yank_action"
26
+
24
27
shell_mode_default=" emacs"
25
28
shell_mode_option=" @shell_mode"
26
29
@@ -71,6 +74,10 @@ yank_selection() {
71
74
get_tmux_option " $yank_selection_option " " $yank_selection_default "
72
75
}
73
76
77
+ yank_action () {
78
+ get_tmux_option " $yank_action_option " " $yank_action_default "
79
+ }
80
+
74
81
shell_mode () {
75
82
get_tmux_option " $shell_mode_option " " $shell_mode_default "
76
83
}
Original file line number Diff line number Diff line change @@ -41,15 +41,15 @@ set_copy_mode_bindings() {
41
41
local copy_wo_newline_command
42
42
copy_wo_newline_command=" $( clipboard_copy_without_newline_command " $copy_command " ) "
43
43
if tmux_is_at_least 2.4; then
44
- tmux bind-key -T copy-mode-vi " $( yank_key) " send-keys -X copy-pipe-and-cancel " $copy_command "
44
+ tmux bind-key -T copy-mode-vi " $( yank_key) " send-keys -X " $( yank_action ) " " $copy_command "
45
45
tmux bind-key -T copy-mode-vi " $( put_key) " send-keys -X copy-pipe-and-cancel " tmux paste-buffer"
46
46
tmux bind-key -T copy-mode-vi " $( yank_put_key) " send-keys -X copy-pipe-and-cancel " $copy_command ; tmux paste-buffer"
47
- tmux bind-key -T copy-mode-vi " $( yank_wo_newline_key) " send-keys -X copy-pipe-and-cancel " $copy_wo_newline_command "
47
+ tmux bind-key -T copy-mode-vi " $( yank_wo_newline_key) " send-keys -X " $( yank_action ) " " $copy_wo_newline_command "
48
48
49
- tmux bind-key -T copy-mode " $( yank_key) " send-keys -X copy-pipe-and-cancel " $copy_command "
49
+ tmux bind-key -T copy-mode " $( yank_key) " send-keys -X " $( yank_action ) " " $copy_command "
50
50
tmux bind-key -T copy-mode " $( put_key) " send-keys -X copy-pipe-and-cancel " tmux paste-buffer"
51
51
tmux bind-key -T copy-mode " $( yank_put_key) " send-keys -X copy-pipe-and-cancel " $copy_command ; tmux paste-buffer"
52
- tmux bind-key -T copy-mode " $( yank_wo_newline_key) " send-keys -X copy-pipe-and-cancel " $copy_wo_newline_command "
52
+ tmux bind-key -T copy-mode " $( yank_wo_newline_key) " send-keys -X " $( yank_action ) " " $copy_wo_newline_command "
53
53
else
54
54
tmux bind-key -t vi-copy " $( yank_key) " copy-pipe " $copy_command "
55
55
tmux bind-key -t vi-copy " $( put_key) " copy-pipe " tmux paste-buffer"
You can’t perform that action at this time.
0 commit comments