]> code.delx.au - gnu-emacs-elpa/commitdiff
ivy.el (ivy-next-line-or-history): Update
authorOleh Krehel <ohwoeowho@gmail.com>
Thu, 18 Feb 2016 12:17:16 +0000 (13:17 +0100)
committerOleh Krehel <ohwoeowho@gmail.com>
Thu, 18 Feb 2016 12:17:16 +0000 (13:17 +0100)
Don't call `ivy-next-line' when `ivy-previous-history-element' is
called.

ivy.el

diff --git a/ivy.el b/ivy.el
index e216554e9094a3e94892d582887ee8cbfca8c686..ebd1c96345e02edc27620f1a264d89df1770685b 100644 (file)
--- a/ivy.el
+++ b/ivy.el
@@ -709,9 +709,9 @@ If the text hasn't changed as a result, forward to `ivy-alt-done'."
   "Move cursor vertically down ARG candidates.
 If the input is empty, select the previous history element instead."
   (interactive "p")
-  (when (string= ivy-text "")
-    (ivy-previous-history-element 1))
-  (ivy-next-line arg))
+  (if (string= ivy-text "")
+      (ivy-previous-history-element 1)
+    (ivy-next-line arg)))
 
 (defun ivy-previous-line (&optional arg)
   "Move cursor vertically up ARG candidates."