branch: master
commit c76c005365f10d840dc4352d48ac499aba99ab0e
Author: Stephen Whipple <[email protected]>
Commit: Oleh Krehel <[email protected]>
Add feedback for sole ivy completion.
When the sole completion is the same as the input, notify the
user.
Fixes #350
---
ivy.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ivy.el b/ivy.el
index 96b04e0..553f1a5 100644
--- 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