diff options
author | Po Lu <luangruo@yahoo.com> | 2022-06-05 15:34:49 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2022-06-05 15:38:23 +0800 |
commit | 6011d39b6a4bc659da364255bcae22c4e6ef3a3f (patch) | |
tree | 785eefe49cab4047016696287f4788be55e2a424 /lisp/dired.el | |
parent | 993853531aebb303870d6ff1ba7db2007d464b63 (diff) | |
download | emacs-6011d39b6a4bc659da364255bcae22c4e6ef3a3f.tar.gz |
Fix drag-and-drop of files with multibyte filenames
* lisp/dired.el (dired-mouse-drag): Fix re-signalling of errors.
* lisp/select.el (xselect-convert-to-filename):
(xselect-convert-to-text-uri-list):
(xselect-convert-to-dt-netfile): Encode in raw-text-unix.
* src/xgselect.c (suppress_xg_select, release_xg_select): New
functions.
(xg_select): Respect xg_select suppression by delegating to
pselect.
* src/xgselect.h: Update prototypes.
* src/xterm.c (x_dnd_begin_drag_and_drop): Suppress xg_select
during the nested event loop.
(handle_one_xevent): Handle cases where hold_quit is nil inside
a selection event handler during DND.
Diffstat (limited to 'lisp/dired.el')
-rw-r--r-- | lisp/dired.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/dired.el b/lisp/dired.el index 7df50a7b2ae..55e150e9e04 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1787,12 +1787,12 @@ other marked file as well. Otherwise, unmark all files." nil action t)))) (error (when (eq (event-basic-type new-event) 'mouse-1) (push new-event unread-command-events)) - ;; Errors from `dnd-begin-drag-file' should be + ;; Errors from `dnd-begin-drag-files' should be ;; treated as user errors, since they should ;; only occur when the user performs an invalid ;; action, such as trying to create a link to - ;; an invalid file. - (user-error error)))))))))) + ;; a remote file. + (user-error (cadr error))))))))))) (defvar dired-mouse-drag-files-map (let ((keymap (make-sparse-keymap))) (define-key keymap [down-mouse-1] #'dired-mouse-drag) |