mirror of
https://github.com/tmux-plugins/tmux-yank.git
synced 2026-09-10 07:36:17 -04:00
Merge pull request #88 from edi9999/fix-copy-line
Fix copyline for tmux 2.4
This commit is contained in:
commit
e6e825186e
|
|
@ -38,7 +38,6 @@
|
|||
|
||||
start_tmux_selection() {
|
||||
if tmux_is_at_least 2.4; then
|
||||
echo "$TMUX_COPY_MODE" >> /tmp/tmux
|
||||
tmux send -X begin-selection
|
||||
elif [ "$TMUX_COPY_MODE" == "vi" ]; then
|
||||
# vi copy mode
|
||||
|
|
@ -94,19 +93,13 @@
|
|||
}
|
||||
|
||||
yank_current_line() {
|
||||
if tmux_is_at_least 2.4; then
|
||||
enter_tmux_copy_mode
|
||||
tmux send -X select-line
|
||||
yank_to_clipboard
|
||||
else
|
||||
go_to_the_beginning_of_current_line
|
||||
add_sleep_for_remote_shells
|
||||
enter_tmux_copy_mode
|
||||
start_tmux_selection
|
||||
end_of_line_in_copy_mode
|
||||
yank_to_clipboard
|
||||
go_to_the_end_of_current_line
|
||||
fi
|
||||
go_to_the_beginning_of_current_line
|
||||
add_sleep_for_remote_shells
|
||||
enter_tmux_copy_mode
|
||||
start_tmux_selection
|
||||
end_of_line_in_copy_mode
|
||||
yank_to_clipboard
|
||||
go_to_the_end_of_current_line
|
||||
display_message 'Line copied to clipboard!'
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue