summaryrefslogtreecommitdiff
path: root/lisp/replace.el
diff options
context:
space:
mode:
authorJuri Linkov <juri@linkov.net>2022-08-09 21:54:32 +0300
committerJuri Linkov <juri@linkov.net>2022-08-09 21:54:32 +0300
commit619d5af54ab1eb4d8f8e5971de65c8baf63f4732 (patch)
treee6e622863749cfe866c07f63ac342a80efbd58b8 /lisp/replace.el
parent41169b55340878120fdf695eb4ac1fcb2679e7b8 (diff)
downloademacs-619d5af54ab1eb4d8f8e5971de65c8baf63f4732.tar.gz
* lisp/replace.el (replace-highlight): Optimize for large buffers (bug#56815)
Let-bind isearch-lazy-count and lazy-highlight-buffer to nil to avoid revisiting all matches in the whole buffer after every replacement.
Diffstat (limited to 'lisp/replace.el')
-rw-r--r--lisp/replace.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/replace.el b/lisp/replace.el
index cac0edf43ac..ae5c804be57 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -2744,7 +2744,9 @@ to a regexp that is actually used for the search.")
(isearch-case-fold-search case-fold)
(isearch-forward (not backward))
(isearch-other-end match-beg)
- (isearch-error nil))
+ (isearch-error nil)
+ (isearch-lazy-count nil)
+ (lazy-highlight-buffer nil))
(isearch-lazy-highlight-new-loop range-beg range-end))))
(defun replace-dehighlight ()