branch: master
commit 823d86cf95f789d4aae6f044c9d5f52d2bd93a48
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>

    counsel.el (counsel-grep): Quote :preselect
---
 counsel.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/counsel.el b/counsel.el
index 162a22e..36450bd 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1807,9 +1807,10 @@ the command."
                              :dynamic-collection t
                              :preselect (format "%d:%s"
                                                 (line-number-at-pos)
-                                                (buffer-substring-no-properties
-                                                 (line-beginning-position)
-                                                 (line-end-position)))
+                                                (regexp-quote
+                                                 
(buffer-substring-no-properties
+                                                  (line-beginning-position)
+                                                  (line-end-position))))
                              :history 'counsel-git-grep-history
                              :update-fn (lambda ()
                                           (counsel-grep-action ivy--current))

Reply via email to