diff --git a/ripgrep.el b/ripgrep.el index fd07263..a5b5c9f 100644 --- a/ripgrep.el +++ b/ripgrep.el @@ -153,7 +153,7 @@ This function is called from `compilation-filter-hook'." (when (< (point) end) (setq end (copy-marker end)) ;; Highlight rg matches and delete marking sequences. - (while (re-search-forward "\033\\[30;43m\\(.*?\\)\033\\[[0-9]*m" end 1) + (while (re-search-forward "\033\\[m\033\\[31m\033\\[1m\\(.*?\\)\033\\[[0-9]*m" end 1) (replace-match (propertize (match-string 1) 'face nil 'font-lock-face 'ripgrep-match-face) t t)) @@ -182,6 +182,7 @@ This function is called from `compilation-filter-hook'." ripgrep-arguments args '("--no-heading --vimgrep -n") + (when ripgrep-highlight-search '("--color=always")) (list (shell-quote-argument regexp) ".")) " ") 'ripgrep-search-mode)))