浏览代码

fix(clipboard): remove clippaste additional newline on wayland (#12140)

So clippaste behaves the same as on X11 (xsel, xclip).
Jordan Galby 4 月之前
父节点
当前提交
fa770f9678
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/clipboard.zsh

+ 1 - 1
lib/clipboard.zsh

@@ -62,7 +62,7 @@ function detect-clipboard() {
     function clippaste() { powershell.exe -noprofile -command Get-Clipboard; }
   elif [ -n "${WAYLAND_DISPLAY:-}" ] && (( ${+commands[wl-copy]} )) && (( ${+commands[wl-paste]} )); then
     function clipcopy() { cat "${1:-/dev/stdin}" | wl-copy &>/dev/null &|; }
-    function clippaste() { wl-paste; }
+    function clippaste() { wl-paste --no-newline; }
   elif [ -n "${DISPLAY:-}" ] && (( ${+commands[xsel]} )); then
     function clipcopy() { cat "${1:-/dev/stdin}" | xsel --clipboard --input; }
     function clippaste() { xsel --clipboard --output; }