mirror of
https://github.com/samoshkin/tmux-config.git
synced 2026-01-05 09:18:01 +00:00
Copy on MouseDragEnd event but do not reset copy mode and selection. Add shortcut to copy whole line. Strip trailing new lines from copied text
This commit is contained in:
@@ -7,7 +7,9 @@ is_app_installed() {
|
||||
}
|
||||
|
||||
# get data either form stdin or from file
|
||||
buf=$(cat "$@")
|
||||
# 'echo -n' to strip any trailing new lines, so when we paste in command prompt
|
||||
# it won't be executed immediately
|
||||
buf=$(cat "$@" | xargs echo -n)
|
||||
|
||||
copy_backend_remote_tunnel_port=$(tmux show-option -gvq "@copy_backend_remote_tunnel_port")
|
||||
copy_use_osc52_fallback=$(tmux show-option -gvq "@copy_use_osc52_fallback")
|
||||
@@ -28,7 +30,7 @@ fi
|
||||
|
||||
# if copy backend is resolved, copy and exit
|
||||
if [ -n "$copy_backend" ]; then
|
||||
printf "$buf" | eval "$copy_backend"
|
||||
printf "$buf" | eval "$copy_backend"
|
||||
exit;
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user