aboutsummaryrefslogtreecommitdiff
path: root/evil-search.el
diff options
context:
space:
mode:
authorAxel Forsman <axelsfor@gmail.com>2022-10-03 22:31:25 +0200
committerTom Dalziel <33435574+tomdl89@users.noreply.github.com>2022-10-04 12:04:34 +0200
commitb46acf25705561a9e065b00581a247efc7a340b2 (patch)
treecd2d62da7c2292c6b60187b1fc0a506e6c2d7068 /evil-search.el
parent30980b30340df4fc8a91a690389d992bd7095ecb (diff)
Fix evil-ex-substitute up to EOB
Fixes #1682
Diffstat (limited to 'evil-search.el')
-rw-r--r--evil-search.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/evil-search.el b/evil-search.el
index ae8f2a4..4b14731 100644
--- a/evil-search.el
+++ b/evil-search.el
@@ -661,9 +661,10 @@ The following properties are supported:
(while (and (not (eobp))
(evil-ex-search-find-next-pattern pattern)
(<= (match-end 0) end)
- (not (and (= (match-end 0) end)
- (string= (evil-ex-pattern-regex pattern)
- "^"))))
+ (not (and (= (match-beginning 0) end)
+ (save-excursion
+ (goto-char (match-beginning 0))
+ (bolp)))))
(let ((ov (or (pop old-ovs) (make-overlay 0 0))))
(move-overlay ov (match-beginning 0) (match-end 0))
(overlay-put ov 'face face)