From: Tak Kunihiro Date: Wed, 20 Jun 2018 07:27:50 +0000 (+0200) Subject: Fix bug of 'mouse-drag-and-drop-region' to detect edges of region (Bug#31905) X-Git-Tag: emacs-26.1.90~342 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d289e7e;p=emacs.git Fix bug of 'mouse-drag-and-drop-region' to detect edges of region (Bug#31905) * lisp/mouse.el (mouse-drag-and-drop-region): Detect both the beginning and the end of character of region during dragging text. --- diff --git a/lisp/mouse.el b/lisp/mouse.el index 5c9056fb43d..f749d12054b 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -2515,9 +2515,9 @@ is copied instead of being cut." (setq drag-but-negligible (and (eq (overlay-buffer mouse-drag-and-drop-overlay) buffer-to-paste) - (< (overlay-start mouse-drag-and-drop-overlay) + (<= (overlay-start mouse-drag-and-drop-overlay) point-to-paste) - (< point-to-paste + (<= point-to-paste (overlay-end mouse-drag-and-drop-overlay))))) ;; Show a tooltip.