branch: externals/ivy-hydra
commit dd8f519cf15cbce66e727ccf3e8d8d3e2a6bd515
Author: Basil L. Contovounesios <[email protected]>
Commit: Oleh Krehel <[email protected]>

    Fix ivy-completion-in-region return value
    
    ivy.el (ivy-completion-in-region): Return non-nil on valid
    completion, even if there was only a single candidate, as per the
    docstring of completion-in-region.
    
    Fixes #2521
---
 ivy.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/ivy.el b/ivy.el
index 9360857..343a3b5 100644
--- a/ivy.el
+++ b/ivy.el
@@ -2713,8 +2713,10 @@ See `completion-in-region' for further information."
                                      (goto-char ivy-completion-beg)
                                      (when initial
                                        (insert initial))))
-                         :caller 'ivy-completion-in-region)
-               t))))))
+                         :caller 'ivy-completion-in-region)))
+           ;; Return value should be non-nil on valid completion;
+           ;; see `completion-in-region'.
+           t))))
 
 (defun ivy-completion-in-region-prompt ()
   "Prompt function for `ivy-completion-in-region'.

Reply via email to