branch: externals/urgrep commit f354b4412150c4fe572aead2f7b1cb710c0d8e19 Author: Jim Porter <jporterb...@gmail.com> Commit: Jim Porter <jporterb...@gmail.com>
Always filter filenames in 'urgrep-filter' This helps ensure that things are highlighted properly even if the value of 'urgrep-group-matches' doesn't match the argument passed to the search tool. --- urgrep.el | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/urgrep.el b/urgrep.el index 94b710a13f..b53a5545dc 100644 --- a/urgrep.el +++ b/urgrep.el @@ -722,14 +722,12 @@ This function is called from `compilation-filter-hook'." t t) (cl-incf urgrep-num-matches-found)) ;; Highlight matching filenames and delete ANSI escapes. - (when urgrep-group-matches - (goto-char beg) - (while (re-search-forward "\033\\[35m\\(.*?\\)\033\\[0?m" end 1) - (replace-match - (propertize (match-string 1) 'face nil 'font-lock-face 'urgrep-hit - 'urgrep-file-name t) - t t))) - + (goto-char beg) + (while (re-search-forward "\033\\[35m\\(.*?\\)\033\\[0?m" end 1) + (replace-match + (propertize (match-string 1) 'face nil 'font-lock-face 'urgrep-hit + 'urgrep-file-name t) + t t)) ;; Delete all remaining escape sequences. (goto-char beg) (while (re-search-forward "\033\\[[0-9;]*[mK]" end 1)