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

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

[elpa] externals/ivy-hydra 683a7b7 309/395: ivy.el (ivy-completion-in-re


From: Basil L. Contovounesios
Subject: [elpa] externals/ivy-hydra 683a7b7 309/395: ivy.el (ivy-completion-in-region): Fix "^" and C-g
Date: Thu, 25 Feb 2021 08:32:27 -0500 (EST)

branch: externals/ivy-hydra
commit 683a7b7a91f8d7b725b0253ed5816463c88ee1d6
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>

    ivy.el (ivy-completion-in-region): Fix "^" and C-g
    
    Fixes #2572
---
 ivy.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/ivy.el b/ivy.el
index 1bc6d9e..de6faf0 100644
--- a/ivy.el
+++ b/ivy.el
@@ -2579,13 +2579,14 @@ See `completion-in-region' for further information."
                  (setq initial nil)
                  (setq predicate nil)
                  (setq collection comps))
-               (if (memq major-mode '(lisp-interaction-mode emacs-lisp-mode))
-                   (setq initial (concat "^" initial))
+               (unless (memq major-mode '(lisp-interaction-mode 
emacs-lisp-mode))
                  (setq collection comps)
                  (setq predicate nil))
                (ivy-read (format "(%s): " str) collection
                          :predicate predicate
-                         :initial-input initial
+                         :initial-input (concat
+                                         (and (memq major-mode 
'(lisp-interaction-mode emacs-lisp-mode)) "^")
+                                         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]