diff options
author | Alan Third <alan@idiocy.org> | 2020-09-27 10:55:32 +0100 |
---|---|---|
committer | Alan Third <alan@idiocy.org> | 2020-10-03 15:41:13 +0100 |
commit | c2a13969e41265506c9965b4b15c064155d3fb78 (patch) | |
tree | e1550b63ec6b0d094d1050b32abefb79442c40ea /lisp/term | |
parent | ef7bc1cc80e727aca10957f4101eefa04e47c84c (diff) | |
download | emacs-c2a13969e41265506c9965b4b15c064155d3fb78.tar.gz |
Make drag and drop on NS open all URLs (bug#43470)
* lisp/term/ns-win.el (ns-drag-n-drop): Merge generic and copy
actions.
Co-authored-by: Daniel MartÃn <mardani29@yahoo.es>
Diffstat (limited to 'lisp/term')
-rw-r--r-- | lisp/term/ns-win.el | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el index 90024b001f7..184271d9e6a 100644 --- a/lisp/term/ns-win.el +++ b/lisp/term/ns-win.el @@ -513,15 +513,9 @@ string dropped into the current buffer." (set-frame-selected-window nil window) (raise-frame) (setq window (selected-window)) - (cond ((memq 'ns-drag-operation-generic operations) - ;; Perform the default action for the type. - (if (eq type 'file) - (dolist (data objects) - (dnd-handle-one-url window 'private (concat "file:" data))) - (dnd-insert-text window 'private string))) - ((memq 'ns-drag-operation-copy operations) - ;; Try to open the file/URL. If type is nil, try to open - ;; it as a URL anyway. + (cond ((or (memq 'ns-drag-operation-generic operations) + (memq 'ns-drag-operation-copy operations)) + ;; Perform the default/copy action. (dolist (data objects) (dnd-handle-one-url window 'private (if (eq type 'file) (concat "file:" data) |