]> code.delx.au - gnu-emacs-elpa/commitdiff
Add feedback for sole ivy completion.
authorStephen Whipple <shw@wicdmedia.org>
Fri, 15 Jan 2016 12:07:31 +0000 (05:07 -0700)
committerOleh Krehel <ohwoeowho@gmail.com>
Fri, 15 Jan 2016 13:09:38 +0000 (14:09 +0100)
When the sole completion is the same as the input, notify the
user.

Fixes #350

ivy.el

diff --git a/ivy.el b/ivy.el
index 96b04e00cd69f4a71a2977debfa357141e6304c4..553f1a54d3763cfbd3b3f0671e53072dda600947 100644 (file)
--- a/ivy.el
+++ b/ivy.el
@@ -1406,7 +1406,8 @@ The previous string is between `ivy-completion-beg' and `ivy-completion-end'."
       (setq ivy-completion-beg (- end (ivy-completion-common-length (car comps))))
       (setq ivy-completion-end end)
       (if (null (cdr comps))
-          (progn
+          (if (string= str (car comps))
+              (message "Sole match")
             (setf (ivy-state-window ivy-last) (selected-window))
             (ivy-completion-in-region-action
              (substring-no-properties