[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/scroll-on-jump a614bc7f8f 06/31: Fix the case when the win
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/scroll-on-jump a614bc7f8f 06/31: Fix the case when the windows buffer is not the current-buffer |
Date: |
Thu, 7 Jul 2022 12:03:12 -0400 (EDT) |
branch: elpa/scroll-on-jump
commit a614bc7f8f31272b5675f268f8f9774c7da04d30
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>
Fix the case when the windows buffer is not the current-buffer
This happens when opening a help window `C-h, f` for example.
In this case the window position isn't a point that can be used
in the current buffer.
---
scroll-on-jump.el | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/scroll-on-jump.el b/scroll-on-jump.el
index dc8472ed0c..7a3f1f3c42 100644
--- a/scroll-on-jump.el
+++ b/scroll-on-jump.el
@@ -390,7 +390,6 @@ Argument ALSO-MOVE-POINT When non-nil, move the POINT as
well."
`
(let
( ;; Set in case we have an error.
- (err-value nil)
(buf (current-buffer))
(window (selected-window))
@@ -413,20 +412,20 @@ Argument ALSO-MOVE-POINT When non-nil, move the POINT as
well."
,@body)
(setq point-next (point))))
- (when (and (eq buf (current-buffer)) (eq window (selected-window)))
+ (when
+ (and
+ (eq buf (current-buffer))
+ (eq window (selected-window))
+ (eq buf (window-buffer window)))
(setq has-context-changed nil))
(cond
(has-context-changed
;; Context changed, use a fallback.
- (goto-char (point)))
+ (goto-char point-next))
(t
;; Calculate the new window start.
- (scroll-on-jump-auto-center window point-prev point-next)))
-
- (when err-value
- ;; Re-raise the error.
- (signal (car err-value) (cdr err-value))))))
+ (scroll-on-jump-auto-center window point-prev point-next))))))
;;;###autoload
(defmacro scroll-on-jump-interactive (fn)
- [nongnu] elpa/scroll-on-jump 69c86542a1 15/31: Docs: add docstrings, (continued)
- [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
- [nongnu] elpa/scroll-on-jump 99386fc01b 30/31: Cleanup: use brief SPDX license, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-jump 556e9a7a81 28/31: Fix error detecting scroll changes, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-jump 9767013ca8 13/31: Support wrapping functions that themselves scroll, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-jump 8fde237ae6 31/31: Change URL to codeberg, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-jump a614bc7f8f 06/31: Fix the case when the windows buffer is not the current-buffer,
ELPA Syncer <=
- [nongnu] elpa/scroll-on-jump 5a6f698b6f 23/31: Cleanup: replace 'if' with 'cond', ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-jump 1e9e09f0cc 29/31: Fix error counting lines jumping to a point outside buffer range, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-jump a2d6996a36 24/31: Cleanup: use defgroup, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-jump 7b2919f8d8 27/31: Fix smooth (pixel) scrolling not being used in most cases, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-jump 1f2349edf4 04/31: Fix scrolling down when the point is at the beginning of the buffer, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-jump e8b79d35d4 09/31: Cleanup: split scroll-on-jump--scroll-impl into it's own function, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-jump 028e672391 03/31: Cleanup: no need for `let*`, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-jump eb77ab1920 02/31: readme: add a more complete example, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-jump 9c333320ea 05/31: Don't catch and re-raise errors, ELPA Syncer, 2022/07/07
- [nongnu] elpa/scroll-on-jump 7a51468bdd 14/31: Cleanup: declare variable, ELPA Syncer, 2022/07/07