[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/scroll-on-drag be3c43b74e 21/35: Fix restoring the point w
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/scroll-on-drag be3c43b74e 21/35: Fix restoring the point with mixed tabs/spaces |
Date: |
Thu, 7 Jul 2022 12:02:50 -0400 (EDT) |
branch: elpa/scroll-on-drag
commit be3c43b74e366bf1d6afe0fdea7830fb7d5cf622
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>
Fix restoring the point with mixed tabs/spaces
---
scroll-on-drag.el | 19 +++----------------
1 file changed, 3 insertions(+), 16 deletions(-)
diff --git a/scroll-on-drag.el b/scroll-on-drag.el
index c956e3561c..cd91918b85 100644
--- a/scroll-on-drag.el
+++ b/scroll-on-drag.el
@@ -201,12 +201,7 @@ Returns true when scrolling took place, otherwise nil."
(restore-x-pointer-shape (and (boundp 'x-pointer-shape) x-pointer-shape))
;; Restore indent (lost when scrolling).
- (restore-indent
- (-
- (point)
- (save-excursion
- (back-to-indentation)
- (point))))
+ (restore-column (current-column))
(mouse-y-fn
(cond
@@ -417,16 +412,8 @@ Returns true when scrolling took place, otherwise nil."
(setq has-scrolled nil))
;; Restore indent level if possible.
- (when (and has-scrolled (> restore-indent 0))
- (move-beginning-of-line nil)
- (right-char
- (min
- restore-indent
- (-
- (save-excursion
- (move-end-of-line nil)
- (point))
- (point)))))
+ (when (and has-scrolled (> restore-column 0))
+ (move-to-column restore-column))
;; Restore pointer.
(when (boundp 'x-pointer-shape)
- [nongnu] elpa/scroll-on-drag 494de949d5 04/35: Restore indent level, (continued)
- [nongnu] elpa/scroll-on-drag 494de949d5 04/35: Restore indent level, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-drag 6cf8c0d81e 06/35: Enable smooth scrolling by default, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-drag 888abd04c3 09/35: Add melpa link, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-drag d8582732d1 29/35: Scroll the window under the mouse cursor, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-drag 31c3baed1d 08/35: Check x-pointer-shape is available before setting, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-drag fa6a293c74 14/35: Correct macro, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-drag 81623ccc59 10/35: Add pre/post hooks, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-drag fb9af98461 34/35: Change URL to codeberg, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-drag d6257b2fb7 05/35: Prevent cursor changing over text, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-drag 823aab7938 27/35: Cleanup: replace 'if' with 'cond', ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-drag be3c43b74e 21/35: Fix restoring the point with mixed tabs/spaces,
ELPA Syncer <=
- [nongnu] elpa/scroll-on-drag 3cd1e1801a 23/35: Update URL, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-drag 2fbd643ea9 16/35: Add .elisp-autofmt to enable auto-formatting, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-drag 01c14f4c02 35/35: Cleanup: quiet checkdoc warning, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-drag 0a362232a0 19/35: Run 'run-window-scroll-functions' after scrolling, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-drag 8962f5f8a7 30/35: Add scroll-on-drag-clamp option to prevent scrolling past point-max, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-drag 2d79a6d9c2 18/35: Cleanup: minor syntax changes, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-drag 97741be699 32/35: Remove override for timer-idle-list, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-drag f9379c56df 03/35: Call redisplay explicitly, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-drag 56ab51a329 07/35: Use zerop instead of comparing with zero, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-drag 882dc94bb8 12/35: Cleanup: remove unused variables, ELPA Syncer, 2022/07/07