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

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

[elpa] externals/topspace c326169190 110/181: Fix inability to use scrol


From: ELPA Syncer
Subject: [elpa] externals/topspace c326169190 110/181: Fix inability to use scrolling commands interactively (#11)
Date: Tue, 23 Aug 2022 12:58:39 -0400 (EDT)

branch: externals/topspace
commit c326169190bac3737a33e5110c1a77a7842e38f5
Author: Trevor Pogue <trevorpogue@gmail.com>
Commit: GitHub <noreply@github.com>

    Fix inability to use scrolling commands interactively (#11)
---
 .gitignore  | 1 +
 topspace.el | 6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000000..54450dd53a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+*.~undo-tree~
\ No newline at end of file
diff --git a/topspace.el b/topspace.el
index ba5b272d5c..c8813cd308 100644
--- a/topspace.el
+++ b/topspace.el
@@ -216,9 +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)
-   ((setq total-lines (car total-lines))
+   (t
     (setq total-lines (or total-lines (- (topspace--window-height)
                                          next-screen-context-lines)))
     (setq topspace--total-lines-scrolling total-lines)
@@ -227,9 +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)
-   ((setq total-lines (car total-lines))
+   (t
     (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

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