summaryrefslogtreecommitdiff
path: root/lisp/isearch.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2011-01-02 15:31:19 -0500
committerChong Yidong <cyd@stupidchicken.com>2011-01-02 15:31:19 -0500
commit7c420169baa7c50428589cca7f8eda71b462eb15 (patch)
treeb556f9e181818bbaf8b5b425844b4ae26e88f537 /lisp/isearch.el
parentbb7f5cbcda931661c8dc3311603ac764fa87a639 (diff)
parentd12f22f52cb7bb18b46f5ea8de5d8e8e04733e3f (diff)
Merge changes from emacs-23 branch
Diffstat (limited to 'lisp/isearch.el')
-rw-r--r--lisp/isearch.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el
index ebe2e8fa009..70508735f83 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -2581,6 +2581,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.
@@ -2622,9 +2623,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)