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>
This commit is contained in:
parent
ef7bc1cc80
commit
c2a13969e4
1 changed files with 3 additions and 9 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue