]> code.delx.au - gnu-emacs-elpa/commitdiff
ivy.el (ivy-read): Reset `ivy-text' earlier
authorOleh Krehel <ohwoeowho@gmail.com>
Thu, 30 Apr 2015 09:24:06 +0000 (11:24 +0200)
committerOleh Krehel <ohwoeowho@gmail.com>
Thu, 30 Apr 2015 09:24:06 +0000 (11:24 +0200)
Related to `counsel-git-grep' "-3 chars more".

ivy.el

diff --git a/ivy.el b/ivy.el
index 429ab82d491b1fb7840c54cb08422bce8ee3d658..323fb8a959595158ff91e51a8d44f31b7ebf0bd0 100644 (file)
--- a/ivy.el
+++ b/ivy.el
@@ -510,6 +510,7 @@ When SORT is t, refer to `ivy-sort-functions-alist' for sorting."
   (setq ivy--collection (and (functionp collection)
                              collection))
   (setq ivy--old-text "")
+  (setq ivy-text "")
   (let (coll sort-fn)
     (cond ((eq collection 'Info-read-node-name-1)
            (if (equal Info-current-file "dir")
@@ -568,7 +569,6 @@ When SORT is t, refer to `ivy-sort-functions-alist' for sorting."
                       0))
     (setq ivy--old-re nil)
     (setq ivy--old-cands nil)
-    (setq ivy-text "")
     (setq ivy--all-candidates coll)
     (setq ivy--update-fn update-fn)
     (setq ivy-exit nil)