From 957e5dd1e98253145a6d8bf5dd392c74ac4b8409 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Mon, 20 Dec 2010 01:18:15 +0000 Subject: * lisp/isearch.el (isearch-lazy-highlight-error): New variable. (isearch-lazy-highlight-new-loop): Compare `isearch-error' and `isearch-lazy-highlight-error'. Set `isearch-lazy-highlight-error' to the current value of `isearch-error' (Bug#7468). --- lisp/isearch.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lisp/isearch.el') diff --git a/lisp/isearch.el b/lisp/isearch.el index 3b04fa270b0..afc18cae127 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -2579,6 +2579,7 @@ since they have special meaning in a regexp." (defvar isearch-lazy-highlight-regexp nil) (defvar isearch-lazy-highlight-space-regexp nil) (defvar isearch-lazy-highlight-forward nil) +(defvar isearch-lazy-highlight-error nil) (defun lazy-highlight-cleanup (&optional force) "Stop lazy highlighting and remove extra highlighting from current buffer. @@ -2620,9 +2621,13 @@ by other Emacs features." (not (= (window-end) ; Window may have been split/joined. isearch-lazy-highlight-window-end)) (not (eq isearch-forward - isearch-lazy-highlight-forward)))) + isearch-lazy-highlight-forward)) + ;; In case we are recovering from an error. + (not (equal isearch-error + isearch-lazy-highlight-error)))) ;; something important did indeed change (lazy-highlight-cleanup t) ;kill old loop & remove overlays + (setq isearch-lazy-highlight-error isearch-error) (when (not isearch-error) (setq isearch-lazy-highlight-start-limit beg isearch-lazy-highlight-end-limit end) -- cgit v1.2.3-70-g09d2