]> code.delx.au - gnu-emacs-elpa/commitdiff
Don't highlight that match in the file name part
authorOleh Krehel <ohwoeowho@gmail.com>
Fri, 22 Apr 2016 07:33:55 +0000 (09:33 +0200)
committerOleh Krehel <ohwoeowho@gmail.com>
Fri, 22 Apr 2016 07:33:55 +0000 (09:33 +0200)
ivy.el (ivy--format-minibuffer-line): Fix for `counsel-git-grep'.

Fixes #483

ivy.el

diff --git a/ivy.el b/ivy.el
index 61103b28f020903acd360e1c6a4f7e56acdd6bd2..8e12408f300ce6224cdd4002179dc277cd5626b7 100644 (file)
--- a/ivy.el
+++ b/ivy.el
@@ -2438,7 +2438,11 @@ SEPARATOR is used to join the candidates."
      start end 'face face str)))
 
 (defun ivy--format-minibuffer-line (str)
-  (let ((start 0)
+  (let ((start
+         (if (and (memq (ivy-state-caller ivy-last) '(counsel-git-grep))
+                  (string-match "^[^:]+:[^:]+:" str))
+             (match-end 0)
+           0))
         (str (copy-sequence str)))
     (cond ((eq ivy--regex-function 'ivy--regex-ignore-order)
            (when (consp ivy--old-re)