From aef5088601d86c8d8d1008036d95079490bfcbba Mon Sep 17 00:00:00 2001 From: Justin Burkett Date: Mon, 1 May 2017 21:45:30 -0400 Subject: Fix highlighting of multi-line substitute patterns evil-ex-hl-update-highlights was adding an extra forward-line for patterns that contained newlines in them, causing every other match to be highlighted. e.g., :%s/C-qC-j/a/ Note that with the g flag there was no problem because (evil-ex-pattern-whole-line pattern) was non-nil. See #824 --- evil-search.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/evil-search.el b/evil-search.el index 0a52114..79090d1 100644 --- a/evil-search.el +++ b/evil-search.el @@ -643,7 +643,10 @@ The following properties are supported: (push ov new-ovs) (when match-hook (funcall match-hook hl ov))) (cond - ((not (evil-ex-pattern-whole-line pattern)) + ((and (not (evil-ex-pattern-whole-line pattern)) + (not (string-match-p "\n" (buffer-substring-no-properties + (match-beginning 0) + (match-end 0))))) (forward-line)) ((= (match-beginning 0) (match-end 0)) (forward-char)) -- cgit v1.0