Mercurial > emacs
diff lisp/isearch.el @ 112098:40af77a50adc
Merge changes from emacs-23 branch
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sun, 02 Jan 2011 15:28:40 -0500 |
parents | 515d80e174ba 3252d895c242 |
children | 417b1e4d63cd |
line wrap: on
line diff
--- a/lisp/isearch.el Sun Jan 02 11:23:02 2011 +0000 +++ b/lisp/isearch.el Sun Jan 02 15:28:40 2011 -0500 @@ -2581,6 +2581,7 @@ (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. @@ -2622,9 +2623,13 @@ (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)