aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2019-09-19 01:12:36 +0300
committerJuri Linkov2019-09-19 01:12:36 +0300
commit107ce3050fc37b9a13d8304ae1bb73fac9de5f61 (patch)
treea9a991c90a659c49dcbb4f1b8c1c99eb431efe00
parent617f4f31a09f974b0c9cbac903643ee553e5eaa8 (diff)
downloademacs-107ce3050fc37b9a13d8304ae1bb73fac9de5f61.tar.gz
emacs-107ce3050fc37b9a13d8304ae1bb73fac9de5f61.zip
* lisp/isearch.el (isearch-lazy-highlight-update): Remember timer object
in isearch-lazy-highlight-timer to cancel it in lazy-highlight-cleanup. (isearch-done): No need to set isearch-lazy-highlight-start to nil - it used to reset lazy-highlight loop like isearch-lazy-highlight-window-start, but now other packages set isearch-lazy-highlight-last-string to nil to reset lazy-highlight loop.
-rw-r--r--lisp/isearch.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 9401e8c06d3..ec51c2cf4cc 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -1370,7 +1370,6 @@ NOPUSH is t and EDIT is t."
1370 (remove-hook 'post-command-hook 'isearch-post-command-hook) 1370 (remove-hook 'post-command-hook 'isearch-post-command-hook)
1371 (remove-hook 'mouse-leave-buffer-hook 'isearch-mouse-leave-buffer) 1371 (remove-hook 'mouse-leave-buffer-hook 'isearch-mouse-leave-buffer)
1372 (remove-hook 'kbd-macro-termination-hook 'isearch-done) 1372 (remove-hook 'kbd-macro-termination-hook 'isearch-done)
1373 (setq isearch-lazy-highlight-start nil)
1374 (when (buffer-live-p isearch--current-buffer) 1373 (when (buffer-live-p isearch--current-buffer)
1375 (with-current-buffer isearch--current-buffer 1374 (with-current-buffer isearch--current-buffer
1376 (setq isearch--current-buffer nil) 1375 (setq isearch--current-buffer nil)
@@ -3970,8 +3969,9 @@ Attempt to do the search exactly the way the pending Isearch would."
3970 (if isearch-lazy-highlight-forward 3969 (if isearch-lazy-highlight-forward
3971 (setq isearch-lazy-highlight-end (point-min)) 3970 (setq isearch-lazy-highlight-end (point-min))
3972 (setq isearch-lazy-highlight-start (point-max))) 3971 (setq isearch-lazy-highlight-start (point-max)))
3973 (run-at-time lazy-highlight-interval nil 3972 (setq isearch-lazy-highlight-timer
3974 'isearch-lazy-highlight-buffer-update)) 3973 (run-at-time lazy-highlight-interval nil
3974 'isearch-lazy-highlight-buffer-update)))
3975 (setq isearch-lazy-highlight-timer 3975 (setq isearch-lazy-highlight-timer
3976 (run-at-time lazy-highlight-interval nil 3976 (run-at-time lazy-highlight-interval nil
3977 'isearch-lazy-highlight-update))))))))) 3977 'isearch-lazy-highlight-update)))))))))