From ab795d0dc0bceaf2a1fa10cbdd5e3bc49c9d814d Mon Sep 17 00:00:00 2001 From: Oleh Krehel Date: Fri, 22 Apr 2016 09:33:55 +0200 Subject: [PATCH] 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 61103b28f..8e12408f3 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) -- 2.39.2