branch: master
commit d8c2ef393d19fa5671c84cb5ee9a3aa790b1389f
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
ivy.el (ivy-partial-or-done): More predictability
* ivy.el (ivy-partial-or-done): Forward to `ivy-alt-done' only if
`ivy-partial' did nothing new, and either previous command was
`ivy-partial-or-done', or there's exactly one matching candidate.
Fixes #107
---
ivy.el | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/ivy.el b/ivy.el
index 22b8ac6..121e8f5 100644
--- a/ivy.el
+++ b/ivy.el
@@ -305,7 +305,9 @@ If the text hasn't changed as a result, forward to
`ivy-alt-done'."
(= ivy--length 1))
(ivy--cd (expand-file-name ivy-text))))
(or (ivy-partial)
- (ivy-alt-done))))
+ (when (or (eq this-command last-command)
+ (eq ivy--length 1))
+ (ivy-alt-done)))))
(defun ivy-partial ()
"Complete the minibuffer text as much as possible."