From 5f0f06d58c16cb45b1dee28dd439ed452418bfae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ho=CC=88ltje?= Date: Tue, 2 May 2017 15:28:29 -0400 Subject: [PATCH] Fix <= 2.3 support I have no idea what I was smoking when I made the 2.4 and pre-2.4 code the same. Closes #83 --- yank.tmux | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/yank.tmux b/yank.tmux index 734af91..8d53afb 100755 --- a/yank.tmux +++ b/yank.tmux @@ -19,8 +19,8 @@ set_error_bindings() { tmux bind-key -t copy-mode-vi "$key" send-keys -X copy-pipe-and-cancel "tmux display-message 'Error! tmux-yank dependencies not installed!'" tmux bind-key -t copy-mode "$key" send-keys -X copy-pipe-and-cancel "tmux display-message 'Error! tmux-yank dependencies not installed!'" else - tmux bind-key -t vi-copy "$key" send-keys -X copy-pipe-and-cancel "tmux display-message 'Error! tmux-yank dependencies not installed!'" - tmux bind-key -t emacs-copy "$key" send-keys -X copy-pipe-and-cancel "tmux display-message 'Error! tmux-yank dependencies not installed!'" + tmux bind-key -t vi-copy "$key" copy-pipe "tmux display-message 'Error! tmux-yank dependencies not installed!'" + tmux bind-key -t emacs-copy "$key" copy-pipe "tmux display-message 'Error! tmux-yank dependencies not installed!'" fi done } @@ -49,15 +49,15 @@ set_copy_mode_bindings() { tmux bind-key -T copy-mode "$(yank_put_key)" send-keys -X copy-pipe-and-cancel "$copy_command; tmux paste-buffer" tmux bind-key -T copy-mode "$(yank_wo_newline_key)" send-keys -X copy-pipe-and-cancel "$copy_wo_newline_command" else - tmux bind-key -t vi-copy "$(yank_key)" send-keys -X copy-pipe-and-cancel "$copy_command" - tmux bind-key -t vi-copy "$(put_key)" send-keys -X copy-pipe-and-cancel "tmux paste-buffer" - tmux bind-key -t vi-copy "$(yank_put_key)" send-keys -X copy-pipe-and-cancel "$copy_command; tmux paste-buffer" - tmux bind-key -t vi-copy "$(yank_wo_newline_key)" send-keys -X copy-pipe-and-cancel "$copy_wo_newline_command" + tmux bind-key -t vi-copy "$(yank_key)" copy-pipe "$copy_command" + tmux bind-key -t vi-copy "$(put_key)" copy-pipe "tmux paste-buffer" + tmux bind-key -t vi-copy "$(yank_put_key)" copy-pipe "$copy_command; tmux paste-buffer" + tmux bind-key -t vi-copy "$(yank_wo_newline_key)" copy-pipe "$copy_wo_newline_command" - tmux bind-key -t emacs-copy "$(yank_key)" send-keys -X copy-pipe-and-cancel "$copy_command" - tmux bind-key -t emacs-copy "$(put_key)" send-keys -X copy-pipe-and-cancel "tmux paste-buffer" - tmux bind-key -t emacs-copy "$(yank_put_key)" send-keys -X copy-pipe-and-cancel "$copy_command; tmux paste-buffer" - tmux bind-key -t emacs-copy "$(yank_wo_newline_key)" send-keys -X copy-pipe-and-cancel "$copy_wo_newline_command" + tmux bind-key -t emacs-copy "$(yank_key)" copy-pipe "$copy_command" + tmux bind-key -t emacs-copy "$(put_key)" copy-pipe "tmux paste-buffer" + tmux bind-key -t emacs-copy "$(yank_put_key)" copy-pipe "$copy_command; tmux paste-buffer" + tmux bind-key -t emacs-copy "$(yank_wo_newline_key)" copy-pipe "$copy_wo_newline_command" fi }