emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/topspace 334cf13ab5 121/181: Internal optimization


From: ELPA Syncer
Subject: [elpa] externals/topspace 334cf13ab5 121/181: Internal optimization
Date: Tue, 23 Aug 2022 12:58:40 -0400 (EDT)

branch: externals/topspace
commit 334cf13ab5be7c1ba301a27e5c8e0da0fffda6eb
Author: Trevor Pogue <poguete@mcmaster.ca>
Commit: Trevor Pogue <poguete@mcmaster.ca>

    Internal optimization
    
    Previous commit resolved #12's issue more succinctly,
    making #12's solution to its issue unnecessary.
---
 topspace.el | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/topspace.el b/topspace.el
index dffc299d43..06acd45a0d 100644
--- a/topspace.el
+++ b/topspace.el
@@ -223,23 +223,7 @@ TOTAL-LINES is used in the same way as in `scroll-down'."
     (setq total-lines (or total-lines (- (topspace--window-height)
                                          next-screen-context-lines)))
     (setq topspace--total-lines-scrolling total-lines)
-    (cond
-     ((and (= (window-start) 1) (> total-lines 0))
-      ;; Prevent "Begining of buffer" error/message when scrolling above
-      ;; top line by passing 0 to `scroll-down' when relevant:
-      (let ((max-height
-             (- (topspace--window-height) (topspace--context-lines)))
-            (old-height (topspace--height)))
-        (topspace--scroll total-lines)
-        ;; But if top space is at its max height, then allow the
-        ;; "Begining of buffer" error/message to occur:
-        (if (= old-height max-height)
-            (list total-lines)
-          (list 0))))
-     (t ;; if no top space present then we don't have to worry about
-      ;; signalling the "Begining of buffer" error/message
-      ;; (so can skip the above conditions for avoiding this error)
-      (list (topspace--scroll total-lines)))))))
+    (list (topspace--scroll total-lines)))))
 
 (defun topspace--filter-args-scroll-up (&optional total-lines)
   "Run before `scroll-up' for scrolling above the top line.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]