[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 4b2c2fa: Adjust cursor column when auto-scrolling during rectangl
From: |
Mattias Engdegård |
Subject: |
master 4b2c2fa: Adjust cursor column when auto-scrolling during rectangle selection |
Date: |
Tue, 17 Dec 2019 04:04:23 -0500 (EST) |
branch: master
commit 4b2c2faab83fe3b13430b837be7d450b5cd47caf
Author: Mattias Engdegård <address@hidden>
Commit: Mattias Engdegård <address@hidden>
Adjust cursor column when auto-scrolling during rectangle selection
* lisp/mouse.el (mouse-drag-region-rectangle):
Move cursor to the correct column during auto-scrolling both when
crutches are used and not (bug#38641). Reported by Konrad Podczeck.
---
lisp/mouse.el | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 32996b2..e9156ff 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -2037,7 +2037,11 @@ This must be bound to a button-down mouse event."
(funcall adjusted-col mouse-col) 'point)
(unless mouse--rectangle-track-cursor
(forward-char))
- (rectangle--reset-point-crutches)))))
+ (rectangle--reset-point-crutches))))
+ (scroll-adjust (lambda ()
+ (move-to-column
+ (funcall adjusted-col mouse-col))
+ (funcall set-col))))
(if (and (eq window start-window)
mouse-row
(<= top mouse-row (1- bottom)))
@@ -2051,11 +2055,11 @@ This must be bound to a button-down mouse event."
((< mouse-row top)
(mouse-scroll-subr
start-window (- mouse-row top) nil start-point
- set-col))
+ scroll-adjust))
((>= mouse-row bottom)
(mouse-scroll-subr
start-window (1+ (- mouse-row bottom)) nil start-point
- set-col)))))))
+ scroll-adjust)))))))
(condition-case err
(progn
(setq track-mouse t)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 4b2c2fa: Adjust cursor column when auto-scrolling during rectangle selection,
Mattias Engdegård <=