Skip to content

Commit

Permalink
Merge pull request #22 from vlevit/highlighting-fix
Browse files Browse the repository at this point in the history
Fix highlighting for recent ripgrep versions
  • Loading branch information
nlamirault authored Aug 10, 2017
2 parents 5af6a0b + 0733a3e commit c47a2da
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ripgrep.el
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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)))

Expand Down

0 comments on commit c47a2da

Please sign in to comment.