diff --git a/.config/kak/autoload/clipboard.kak b/.config/kak/autoload/clipboard.kak index 85d297dd..9c735a44 100644 --- a/.config/kak/autoload/clipboard.kak +++ b/.config/kak/autoload/clipboard.kak @@ -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' 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%' fi + echo ": delete-buffer" else echo '' fi } - # clean up - # delete-buffer } }