emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ivy-hydra fc3252b 274/395: Don't insert ^ on aborting c


From: Basil L. Contovounesios
Subject: [elpa] externals/ivy-hydra fc3252b 274/395: Don't insert ^ on aborting completion in region
Date: Thu, 25 Feb 2021 08:32:18 -0500 (EST)

branch: externals/ivy-hydra
commit fc3252b6921734311e4904598172ba504909ba59
Author: Basil L. Contovounesios <contovob@tcd.ie>
Commit: Basil L. Contovounesios <contovob@tcd.ie>

    Don't insert ^ on aborting completion in region
    
    * ivy.el (ivy-completion-in-region): Don't permanently prepend "^"
    to initial input, otherwise it will get inserted on C-g.
    
    Re: #2562
---
 ivy.el | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/ivy.el b/ivy.el
index 0e16a97..3b55948 100644
--- a/ivy.el
+++ b/ivy.el
@@ -2726,12 +2726,12 @@ See `completion-in-region' for further information."
                  (setq initial nil)
                  (setq predicate nil)
                  (setq collection comps))
-               (if (functionp collection)
-                   (setq collection comps)
-                 (setq initial (concat "^" initial)))
-               (ivy-read (format "(%s): " str) collection
+               (ivy-read (format "(%s): " str)
+                         (if (functionp collection) comps collection)
                          :predicate predicate
-                         :initial-input initial
+                         :initial-input (concat (unless (functionp collection)
+                                                  "^")
+                                                initial)
                          :action #'ivy-completion-in-region-action
                          :unwind (lambda ()
                                    (unless (eq ivy-exit 'done)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]