]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve 'gui-get-selection' on MS-Windows
authorEli Zaretskii <eliz@gnu.org>
Thu, 20 Mar 2025 09:03:32 +0000 (11:03 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sun, 23 Mar 2025 18:09:14 +0000 (19:09 +0100)
* lisp/term/w32-win.el (w32--get-selection): Allow UTF8_STRING and
TEXT data types as well, since w32select.c handles that correctly.

(cherry picked from commit e53b90a5ce21feeb0290fbe035e9a2d6aae34bc3)

lisp/term/w32-win.el

index fa7862d9bff62d79c41909b7a2e28b6c33e35f60..a1959cd11bea97aad4db1edf3a1f273ae6848119 100644 (file)
@@ -416,7 +416,7 @@ also be textual."
 
 (defun w32--get-selection (&optional type data-type)
   (cond ((and (eq type 'CLIPBOARD)
-              (eq data-type 'STRING))
+              (memq data-type '(STRING UTF8_STRING TEXT)))
          (with-demoted-errors "w32-get-clipboard-data:%S"
            (w32-get-clipboard-data)))
         ((eq data-type 'TARGETS)