[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/scroll-on-drag 42d96a60a2 22/35: Cleanup: simplify some lo
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/scroll-on-drag 42d96a60a2 22/35: Cleanup: simplify some logic using 'line-beginning-position' |
Date: |
Thu, 7 Jul 2022 12:02:50 -0400 (EDT) |
branch: elpa/scroll-on-drag
commit 42d96a60a207cd73e7a58111358deb05f084c59e
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>
Cleanup: simplify some logic using 'line-beginning-position'
---
scroll-on-drag.el | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/scroll-on-drag.el b/scroll-on-drag.el
index cd91918b85..9c483a106a 100644
--- a/scroll-on-drag.el
+++ b/scroll-on-drag.el
@@ -23,7 +23,7 @@
;;; Commentary:
-;; Interactive scrolling which can be cancelled by pressing escape.
+;; Interactive scrolling which can be canceled by pressing escape.
;;; Usage
@@ -217,8 +217,7 @@ Returns true when scrolling took place, otherwise nil."
(if scroll-on-drag-smooth
(save-excursion
(goto-char (point-max))
- (move-beginning-of-line nil)
- (point))
+ (line-beginning-position))
0))
(mouse-y-delta-scale-fn
@@ -339,14 +338,7 @@ Returns true when scrolling took place, otherwise nil."
;; when the cursor is partially outside the view.
(scroll-consrtain-point-below-window-start-fn
(lambda ()
- (let
- (
- (lines-from-top
- (count-lines
- (window-start)
- (save-excursion
- (move-beginning-of-line nil)
- (point)))))
+ (let ((lines-from-top (count-lines (window-start)
(line-beginning-position))))
(when (> scroll-margin lines-from-top)
(forward-line (- scroll-margin lines-from-top))
(let ((inhibit-redisplay nil))
- [nongnu] branch elpa/scroll-on-drag created (now 01c14f4c02), ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-drag f07ea06555 13/35: Cleanup: style, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-drag 42d96a60a2 22/35: Cleanup: simplify some logic using 'line-beginning-position',
ELPA Syncer <=
- [nongnu] elpa/scroll-on-drag ad94790492 24/35: readme: link to melpa, tweak title level, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-drag 31f322554d 31/35: Cleanup: move force-redisplay into an inline function, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-drag d93b69eed6 33/35: Cleanup: use brief SPDX license, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-drag 64445dd96f 15/35: Apply auto-formatting, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-drag a717d58f31 01/35: Add license file, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-drag a668537a8d 02/35: Initial modal scroll, ELPA Syncer, 2022/07/07
- [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