branch: master
commit 841d59b8aedb42d20b758a04a4236756ba5c9a62
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>

    "C-s" should forward to "C-n" etc
    
    * ivy.el (ivy-next-line-or-history): Update.
    (ivy-previous-line-or-history): Update.
---
 ivy.el |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/ivy.el b/ivy.el
index 180f081..c6ec991 100644
--- a/ivy.el
+++ b/ivy.el
@@ -119,10 +119,7 @@ If the input is empty, select the previous history element 
instead."
   (interactive)
   (when (string= ivy-text "")
     (ivy-previous-history-element 1))
-  (if (>= ivy--index (1- ivy--length))
-      (when ivy-wrap
-        (ivy-beginning-of-buffer))
-    (cl-incf ivy--index)))
+  (ivy-next-line))
 
 (defun ivy-previous-line ()
   "Select the previous completion candidate."
@@ -138,10 +135,7 @@ If the input is empty, select the previous history element 
instead."
   (interactive)
   (when (string= ivy-text "")
     (ivy-previous-history-element 1))
-  (if (zerop ivy--index)
-      (when ivy-wrap
-        (ivy-end-of-buffer))
-    (cl-decf ivy--index)))
+  (ivy-previous-line))
 
 (defun ivy-previous-history-element (arg)
   "Forward to `previous-history-element' with ARG."

Reply via email to