branch: externals/vlf
commit 6bb60b72adfe5b3abc44a9d135ddf4484114c2fa
Author: Andrey Kotlarski <[email protected]>
Commit: Andrey Kotlarski <[email protected]>
Fix hexl scroll up called from scroll down behavior.
---
vlf.el | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/vlf.el b/vlf.el
index 79b88e4..e19a919 100644
--- a/vlf.el
+++ b/vlf.el
@@ -222,15 +222,16 @@ When prefix argument is negative
(add-hook 'vlf-before-chunk-update 'vlf-hexl-before)
(add-hook 'vlf-after-chunk-update 'vlf-hexl-after)
-(defadvice hexl-scroll-up (around vlf-scroll-up
+(defadvice hexl-scroll-up (around vlf-hexl-scroll-up
activate compile)
"Slide to next batch if at end of buffer in `vlf-mode'."
- (if (and vlf-mode (pos-visible-in-window-p (point-max)))
+ (if (and vlf-mode (pos-visible-in-window-p (point-max))
+ (or (not (numberp arg)) (< 0 arg)))
(progn (vlf-next-batch 1)
(goto-char (point-min)))
ad-do-it))
-(defadvice hexl-scroll-down (around vlf-scroll-down
+(defadvice hexl-scroll-down (around vlf-hexl-scroll-down
activate compile)
"Slide to previous batch if at beginning of buffer in `vlf-mode'."
(if (and vlf-mode (pos-visible-in-window-p (point-min)))