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

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

[elpa] master 86d0884 087/167: fix 1-too-far scrolling issue


From: Oleh Krehel
Subject: [elpa] master 86d0884 087/167: fix 1-too-far scrolling issue
Date: Tue, 08 Dec 2015 10:50:09 +0000

branch: master
commit 86d0884c29de43da7c15727144abe702ad0c436f
Author: mike <address@hidden>
Commit: mike <address@hidden>

    fix 1-too-far scrolling issue
    
    Functions `ivy-scroll-up-command' and `ivy-scroll-down-command' would
    scroll 1 unit too far. So one item in the list would be skipped
    and never seen for each scroll.
---
 ivy.el |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ivy.el b/ivy.el
index d8d7592..459312c 100644
--- a/ivy.el
+++ b/ivy.el
@@ -545,13 +545,13 @@ If the text hasn't changed as a result, forward to 
`ivy-alt-done'."
 (defun ivy-scroll-up-command ()
   "Scroll the candidates upward by the minibuffer height."
   (interactive)
-  (ivy-set-index (min (+ ivy--index ivy-height)
+  (ivy-set-index (min (1- (+ ivy--index ivy-height))
                       (1- ivy--length))))
 
 (defun ivy-scroll-down-command ()
   "Scroll the candidates downward by the minibuffer height."
   (interactive)
-  (ivy-set-index (max (- ivy--index ivy-height)
+  (ivy-set-index (max (1+ (- ivy--index ivy-height))
                       0)))
 
 (defun ivy-minibuffer-grow ()



reply via email to

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