[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#31905: detection of edge of highlighted text by mouse-drag-and-drop-
bug#31905: detection of edge of highlighted text by mouse-drag-and-drop-region
Wed, 20 Jun 2018 08:25:41 +0900 (JST)
I found bug on `mouse-drag-and-drop-region'. The
`mouse-drag-and-drop-region' does not recognize the beginning and the
end of highlighted text as pre existing region.
1: emacs -Q
2: (setq mouse-drag-and-drop-region 'meta)
2: Select text on a buffer and have a region. Let's assume `This buffer' is
3: Drag and drop the text onto the first character of the region, that is `T'.
4: Then the text `This buffer' would be disappeared.
I attach a patch to fix the bug. This patch is relative to 26.1.50.
* Commit log
Author: Tak Kunihiro <address@hidden>
Fix bug of 'mouse-drag-and-drop-region' to detect edges of region
(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 5c9056fb43..f749d12054 100644
@@ -2515,9 +2515,9 @@ mouse-drag-and-drop-region
(and (eq (overlay-buffer mouse-drag-and-drop-overlay)
- (< (overlay-start mouse-drag-and-drop-overlay)
+ (<= (overlay-start mouse-drag-and-drop-overlay)
- (< point-to-paste
+ (<= point-to-paste
;; Show a tooltip.
- bug#31905: detection of edge of highlighted text by mouse-drag-and-drop-region,
Tak Kunihiro <=