diff --git a/lisp/init-edit.el b/lisp/init-edit.el index 563c6d330..36aef9c67 100644 --- a/lisp/init-edit.el +++ b/lisp/init-edit.el @@ -420,13 +420,12 @@ (use-package xclip :hook (after-init . xclip-mode) :config - (set-clipboard-coding-system 'gbk) - ;; @see https://github.com/microsoft/wslg/issues/15#issuecomment-1796195663 (when (eq xclip-method 'wl-copy) + (set-clipboard-coding-system 'gbk) ; for wsl (setq interprogram-cut-function (lambda (text) - (start-process "wl-copy" nil "wl-copy" "--trim-newline" "--type" "text/plain;charset=utf-8" text)))))) + (start-process "xclip" nil xclip-program "--trim-newline" "--type" "text/plain;charset=utf-8" text)))))) ;; Open files as another user (unless sys/win32p