Browse Source

fix(vi-mode): ignore `clip*` function errors in yank and put widgets

Fixes #9605
pull/9607/head
Marc Cornellà 1 year ago
parent
commit
efcbd9f348
  1. 4
      plugins/vi-mode/vi-mode.plugin.zsh

4
plugins/vi-mode/vi-mode.plugin.zsh

@ -100,13 +100,13 @@ function wrap_clipboard_widgets() {
eval "
function ${wrapped_name}() {
zle .${widget}
printf %s \"\${CUTBUFFER}\" | clipcopy
printf %s \"\${CUTBUFFER}\" | clipcopy 2>/dev/null || true
}
"
else
eval "
function ${wrapped_name}() {
CUTBUFFER=\"\$(clippaste)\"
CUTBUFFER=\"\$(clippaste 2>/dev/null || echo \$CUTBUFFER)\"
zle .${widget}
}
"

Loading…
Cancel
Save