From f6f5634378228bf170576d5fad691a9708e3023c Mon Sep 17 00:00:00 2001 From: Po Lu Date: Tue, 7 Jun 2022 02:44:08 +0000 Subject: [PATCH] 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. --- lisp/term/haiku-win.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- 2.39.2