branch: master
commit 86d0884c29de43da7c15727144abe702ad0c436f
Author: mike <[email protected]>
Commit: mike <[email protected]>
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 ()