From: Oleh Krehel Date: Fri, 22 Apr 2016 07:33:55 +0000 (+0200) Subject: Don't highlight that match in the file name part X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/ab795d0dc0bceaf2a1fa10cbdd5e3bc49c9d814d Don't highlight that match in the file name part ivy.el (ivy--format-minibuffer-line): Fix for `counsel-git-grep'. Fixes #483 --- 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)