[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/scroll-on-jump 4b11cda039 07/31: Cleanup: pass the window
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/scroll-on-jump 4b11cda039 07/31: Cleanup: pass the window to count-screen-lines |
Date: |
Thu, 7 Jul 2022 12:03:12 -0400 (EDT) |
branch: elpa/scroll-on-jump
commit 4b11cda03947988167863b30d5810c2e98e79ee1
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>
Cleanup: pass the window to count-screen-lines
This is to be explicit, as the window will be the current window anyway.
---
scroll-on-jump.el | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/scroll-on-jump.el b/scroll-on-jump.el
index 7a3f1f3c42..b5292d5fd5 100644
--- a/scroll-on-jump.el
+++ b/scroll-on-jump.el
@@ -317,8 +317,7 @@ Argument ALSO-MOVE-POINT When non-nil, move the POINT as
well."
(defun scroll-on-jump-auto-center (window point-prev point-next)
"Re-frame WINDOW from POINT-PREV to POINT-NEXT, optionally animating."
;; Count lines, excluding the current line.
-
- (let ((lines (1- (count-screen-lines point-prev point-next t))))
+ (let ((lines (1- (count-screen-lines point-prev point-next t window))))
(when (> lines 0)
(let
(
@@ -332,7 +331,7 @@ Argument ALSO-MOVE-POINT When non-nil, move the POINT as
well."
(if (eq dir 1)
(let*
(
- (window-lines-prev (count-screen-lines (window-start window)
point-prev t))
+ (window-lines-prev (count-screen-lines (window-start window)
point-prev t window))
(window-lines-next (+ window-lines-prev lines))
(lines-limit (max (/ height 2) window-lines-prev)))
(when (>= window-lines-next lines-limit)
@@ -351,7 +350,7 @@ Argument ALSO-MOVE-POINT When non-nil, move the POINT as
well."
( ;; Note that we can't use `window-end' here as we may
;; be scrolled past the screen end-point.
(window-lines-prev
- (- height (count-screen-lines (window-start window) point-prev
t)))
+ (- height (count-screen-lines (window-start window) point-prev
t window)))
(window-lines-next (+ window-lines-prev lines))
(lines-limit (max (/ height 2) window-lines-prev)))
(when (>= window-lines-next lines-limit)
- [nongnu] branch elpa/scroll-on-jump created (now 8fde237ae6), ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-jump 4b11cda039 07/31: Cleanup: pass the window to count-screen-lines,
ELPA Syncer <=
- [nongnu] elpa/scroll-on-jump 94986120c4 08/31: readme: add link to demo video, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-jump fddbdfdfe0 11/31: Fix error where the pixel scroll was left a non-zero value, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-jump 42329b5707 20/31: Fix visual glitch when used with next/previous line, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-jump 5007e9ea8a 18/31: readme: add examples suggested in #2, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-jump 69c86542a1 15/31: Docs: add docstrings, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-jump dd2818d906 17/31: Cleanup: make docstring under 80 chars, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-jump 30dc5f5e50 21/31: Cleanup: remove recursion check, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-jump 28bac2cdc3 22/31: Cleanup: quiet checkdoc warnings for wide docstrings, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-jump 0ce93b3ea6 19/31: readme: remove 'evil-goto-first-line' as 'evil-goto-line' already scrolls, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-jump 000dc41039 25/31: Fix error passing out-of-range point to count-screen-lines, ELPA Syncer, 2022/07/07