branch: externals/topspace
commit e3cd398678ca16328f708aeaa3419ef6a436c7c8
Author: Trevor Pogue <pogu...@mcmaster.ca>
Commit: Trevor Pogue <pogu...@mcmaster.ca>

    Fix bug caused by #11 when scrolling with topspace disabled
    
    - #11 caused a bug where is was not possible to scroll anymore if
      topspace is disabled in the current buffer. This resolves that issue.
---
 topspace.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/topspace.el b/topspace.el
index c8813cd308..f41b0867ae 100644
--- a/topspace.el
+++ b/topspace.el
@@ -216,10 +216,10 @@ TOTAL-LINES is used in the same way as in `scroll-down'."
 (defun topspace--filter-args-scroll-down (&optional total-lines)
   "Run before `scroll-down' for scrolling above the top line.
 TOTAL-LINES is used in the same way as in `scroll-down'."
-  (setq total-lines (car total-lines))
   (cond
    ((not (topspace--enabled)) total-lines)
    (t
+    (setq total-lines (car total-lines))
     (setq total-lines (or total-lines (- (topspace--window-height)
                                          next-screen-context-lines)))
     (setq topspace--total-lines-scrolling total-lines)
@@ -228,10 +228,10 @@ TOTAL-LINES is used in the same way as in `scroll-down'."
 (defun topspace--filter-args-scroll-up (&optional total-lines)
   "Run before `scroll-up' for scrolling above the top line.
 TOTAL-LINES is used in the same way as in `scroll-up'."
-  (setq total-lines (car total-lines))
   (cond
    ((not (topspace--enabled)) total-lines)
    (t
+    (setq total-lines (car total-lines))
     (setq total-lines (* (or total-lines (- (topspace--window-height)
                                             next-screen-context-lines)) -1))
     (setq topspace--total-lines-scrolling total-lines)

Reply via email to