diff --git a/plugins/vi-mode/vi-mode.plugin.zsh b/plugins/vi-mode/vi-mode.plugin.zsh index 0b11a6a7f..7f14961ad 100644 --- a/plugins/vi-mode/vi-mode.plugin.zsh +++ b/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} } "