]> git.eshelyaron.com Git - emacs.git/commitdiff
Make drag and drop on NS open all URLs (bug#43470)
authorAlan Third <alan@idiocy.org>
Sun, 27 Sep 2020 09:55:32 +0000 (10:55 +0100)
committerAlan Third <alan@idiocy.org>
Sat, 3 Oct 2020 14:41:13 +0000 (15:41 +0100)
* lisp/term/ns-win.el (ns-drag-n-drop): Merge generic and copy
actions.

Co-authored-by: Daniel Martín <mardani29@yahoo.es>
lisp/term/ns-win.el

index 90024b001f7c709131df6e121e95188c390655ea..184271d9e6adde40559fac102b4546919328cd59 100644 (file)
@@ -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)