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

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

[elpa] externals/vlf a42247c 150/310: Automatically scroll to adjacent b


From: Stefan Monnier
Subject: [elpa] externals/vlf a42247c 150/310: Automatically scroll to adjacent batch when start or end of chunk is
Date: Sat, 28 Nov 2020 00:33:05 -0500 (EST)

branch: externals/vlf
commit a42247cac4750345f76a8277aad6dfd2cea5db2b
Author: Andrey Kotlarski <m00naticus@gmail.com>
Commit: Andrey Kotlarski <m00naticus@gmail.com>

    Automatically scroll to adjacent batch when start or end of chunk is
    visible.
---
 vlf.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/vlf.el b/vlf.el
index 4d37846..4f01a7b 100644
--- a/vlf.el
+++ b/vlf.el
@@ -178,7 +178,7 @@ OP-TYPE specifies the file operation being performed over 
FILENAME."
 (defadvice scroll-up (around vlf-scroll-up
                              activate compile)
   "Slide to next batch if at end of buffer in `vlf-mode'."
-  (if (and vlf-mode (eobp))
+  (if (and vlf-mode (pos-visible-in-window-p (point-max)))
       (progn (vlf-next-batch 1)
              (goto-char (point-min)))
     ad-do-it))
@@ -186,7 +186,7 @@ OP-TYPE specifies the file operation being performed over 
FILENAME."
 (defadvice scroll-down (around vlf-scroll-down
                                activate compile)
   "Slide to previous batch if at beginning of buffer in `vlf-mode'."
-  (if (and vlf-mode (bobp))
+  (if (and vlf-mode (pos-visible-in-window-p (point-min)))
       (progn (vlf-prev-batch 1)
              (goto-char (point-max)))
     ad-do-it))



reply via email to

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