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

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

[elpa] master ab795d0 265/272: Don't highlight that match in the file na


From: Oleh Krehel
Subject: [elpa] master ab795d0 265/272: Don't highlight that match in the file name part
Date: Mon, 25 Apr 2016 10:13:29 +0000

branch: master
commit ab795d0dc0bceaf2a1fa10cbdd5e3bc49c9d814d
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    Don't highlight that match in the file name part
    
    ivy.el (ivy--format-minibuffer-line): Fix for `counsel-git-grep'.
    
    Fixes #483
---
 ivy.el |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ivy.el b/ivy.el
index 61103b2..8e12408 100644
--- 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]