[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master f5293b3364: Adjust x-clipboard-yank for recent selection ownershi
From: |
Po Lu |
Subject: |
master f5293b3364: Adjust x-clipboard-yank for recent selection ownership changes |
Date: |
Tue, 28 Jun 2022 06:26:50 -0400 (EDT) |
branch: master
commit f5293b336478ca48052b6a4b1538de45446317f4
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Adjust x-clipboard-yank for recent selection ownership changes
* lisp/term/x-win.el (x-clipboard-yank): Don't own CLIPBOARD
inside kill-new.
---
lisp/term/x-win.el | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index 32675a07b1..7c88c85cef 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -1182,8 +1182,12 @@ as returned by `x-server-vendor'."
(interactive "*")
(let ((clipboard-text (gui--selection-value-internal 'CLIPBOARD))
(select-enable-clipboard t))
- (if (and clipboard-text (> (length clipboard-text) 0))
- (kill-new clipboard-text))
+ (when (and clipboard-text (> (length clipboard-text) 0))
+ ;; Avoid asserting ownership of CLIPBOARD, which will cause
+ ;; `gui-selection-value' to return nil in the future.
+ ;; (bug#56273)
+ (let ((select-enable-clipboard nil))
+ (kill-new clipboard-text)))
(yank)))
(declare-function accelerate-menu "xmenu.c" (&optional frame) t)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master f5293b3364: Adjust x-clipboard-yank for recent selection ownership changes,
Po Lu <=