From: Po Lu Date: Tue, 7 Jun 2022 02:44:08 +0000 (+0000) Subject: Update Haiku drag-and-drop code X-Git-Tag: emacs-29.0.90~1910^2~183 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f6f5634378228bf170576d5fad691a9708e3023c;p=emacs.git Update Haiku drag-and-drop code * lisp/term/haiku-win.el (haiku-drag-and-drop): Don't allow dropping on places other than the text area (it doesn't work). Also respect mouse-yank-at-point. --- diff --git a/lisp/term/haiku-win.el b/lisp/term/haiku-win.el index 0dcfc1e9205..6ddf546ee57 100644 --- a/lisp/term/haiku-win.el +++ b/lisp/term/haiku-win.el @@ -311,6 +311,9 @@ or a pair of markers) and turns it into a file system reference." (if (eq string 'lambda) ; This means the mouse moved. (dnd-handle-movement (event-start event)) (cond + ;; Don't allow dropping on something other than the text area. + ;; It does nothing and doesn't work with text anyway. + ((posn-area (event-start event))) ((assoc "refs" string) (with-selected-window window (raise-frame) @@ -326,7 +329,8 @@ or a pair of markers) and turns it into a file system reference." (with-selected-window window (raise-frame) (dolist (text (cddr (assoc "text/plain" string))) - (goto-char (posn-point (event-start event))) + (unless mouse-yank-at-point + (goto-char (posn-point (event-start event)))) (dnd-insert-text window 'private (if (multibyte-string-p text) text