[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master be80798 86/90: Fix the initial input bug introduced with "
From: |
Oleh Krehel |
Subject: |
[elpa] master be80798 86/90: Fix the initial input bug introduced with "C-r" |
Date: |
Tue, 30 Jun 2015 07:29:36 +0000 |
branch: master
commit be8079823ff39b051584cff01d3597c5fe61ecfe
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
Fix the initial input bug introduced with "C-r"
* ivy.el (ivy-read): Use (ivy-state-initial-input ivy-last).
(ivy--reset-state): Set (ivy-state-initial-input ivy-last).
Fixes #162
---
ivy.el | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/ivy.el b/ivy.el
index 67f0b1d..12b1ad2 100644
--- a/ivy.el
+++ b/ivy.el
@@ -743,9 +743,6 @@ MATCHER can completely override matching.
DYNAMIC-COLLECTION is a function to call to update the list of
candidates with each input."
- (unless initial-input
- (setq initial-input (cdr (assoc this-command
- ivy-initial-inputs-alist))))
(setq ivy-last
(make-ivy-state
:prompt prompt
@@ -774,7 +771,7 @@ candidates with each input."
(minibuffer-completion-predicate predicate)
(res (read-from-minibuffer
prompt
- initial-input
+ (ivy-state-initial-input ivy-last)
(make-composed-keymap keymap ivy-minibuffer-map)
nil
hist)))
@@ -805,6 +802,9 @@ This is useful for recursive `ivy-read'."
(dynamic-collection (ivy-state-dynamic-collection state))
(initial-input (ivy-state-initial-input state))
(require-match (ivy-state-require-match state)))
+ (unless initial-input
+ (setq initial-input (cdr (assoc this-command
+ ivy-initial-inputs-alist))))
(setq ivy--directory nil)
(setq ivy--regex-function
(or re-builder
@@ -884,7 +884,8 @@ This is useful for recursive `ivy-read'."
(ivy--directory
prompt)
(t
- nil)))))
+ nil)))
+ (setf (ivy-state-initial-input ivy-last) initial-input)))
(defun ivy-completing-read (prompt collection
&optional predicate require-match initial-input
- [elpa] master 321f277 76/90: Fix color blending for composite faces, (continued)
- [elpa] master 321f277 76/90: Fix color blending for composite faces, Oleh Krehel, 2015/06/30
- [elpa] master b12e30c 77/90: Fix last commit being incompatible with older Emacs, Oleh Krehel, 2015/06/30
- [elpa] master 337a1d0 73/90: ivy.el (ivy-initial-inputs-alist): Add some Org commands, Oleh Krehel, 2015/06/30
- [elpa] master d921875 79/90: counsel.el (counsel-load-theme): New command, Oleh Krehel, 2015/06/30
- [elpa] master 017e007 78/90: counsel.el (counsel-M-x): Avoid compilation warning, Oleh Krehel, 2015/06/30
- [elpa] master 64b76c3 81/90: Fixup compilation warnings related to smex, Oleh Krehel, 2015/06/30
- [elpa] master 225e5aa 82/90: Allow to recursively match history with "C-r", Oleh Krehel, 2015/06/30
- [elpa] master dcd0c50 80/90: counsel.el (counsel-unicode-char): Use action-style call, Oleh Krehel, 2015/06/30
- [elpa] master a287f39 84/90: counsel.el (counsel-git-grep-history): New defvar, Oleh Krehel, 2015/06/30
- [elpa] master e072e96 83/90: swiper.el (swiper-history): New defvar, Oleh Krehel, 2015/06/30
- [elpa] master be80798 86/90: Fix the initial input bug introduced with "C-r",
Oleh Krehel <=
- [elpa] master 5036f23 87/90: Make counsel-el work with "C-M-n" and "C-M-p", Oleh Krehel, 2015/06/30
- [elpa] master c33bb2d 88/90: ivy-hydra.el (hydra-ivy): Bind "C-o" to be a toggle, Oleh Krehel, 2015/06/30
- [elpa] master e953099 89/90: Make counsel-locate use a process, Oleh Krehel, 2015/06/30
- [elpa] master e503688 85/90: counsel.el (counsel-find-file): Use `file-name-history', Oleh Krehel, 2015/06/30
- [elpa] master 55e0188 90/90: Merge commit 'e9530990914c1d81889269b4a8365b8003625557' from swiper, Oleh Krehel, 2015/06/30