AutoYADM commit: 2025-06-09 14:13:22
This commit is contained in:
parent
13998f3066
commit
654ea26909
1 changed files with 2 additions and 4 deletions
|
@ -22,13 +22,12 @@ define-command -docstring %{
|
|||
set-option local clip_selcount %val{selection_count}
|
||||
# copy selections
|
||||
execute-keys '"ay'
|
||||
# disposable buffer
|
||||
edit -scratch
|
||||
# set shell register to copy command
|
||||
set-register | %opt{clipboard_copy_cmd}
|
||||
# branch based on switch
|
||||
execute-keys %sh{
|
||||
if [ "$kak_opt_clip_selcount" -gt 1 ]; then
|
||||
echo ': edit -scratch<ret>'
|
||||
if [ ${#} = 1 ] && [ ${1} = '-split' ]; then
|
||||
# paste all
|
||||
# reduce selections to those without newline
|
||||
|
@ -42,12 +41,11 @@ define-command -docstring %{
|
|||
# paste all, select all, pipe to copy cmd
|
||||
echo '"a<a-P>%<a-|><ret>'
|
||||
fi
|
||||
echo ": delete-buffer<ret>"
|
||||
else
|
||||
echo '<a-|><ret>'
|
||||
fi
|
||||
}
|
||||
# clean up
|
||||
# delete-buffer
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue