changeset 56938:4fb2d507742d

(isearch-lazy-highlight-new-loop): Don't invoke highlighting if the search string is empty.
author Richard M. Stallman <rms@gnu.org>
date Sat, 04 Sep 2004 19:40:17 +0000
parents 3f1cdaf7990a
children 51ddfe0b89c6
files lisp/isearch.el
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/isearch.el	Sat Sep 04 19:13:40 2004 +0000
+++ b/lisp/isearch.el	Sat Sep 04 19:40:17 2004 +0000
@@ -2362,9 +2362,10 @@
 	    isearch-lazy-highlight-case-fold-search isearch-case-fold-search
 	    isearch-lazy-highlight-regexp	isearch-regexp
             isearch-lazy-highlight-wrapped      nil)
-      (setq isearch-lazy-highlight-timer
-            (run-with-idle-timer isearch-lazy-highlight-initial-delay nil
-                                 'isearch-lazy-highlight-update)))))
+      (unless (equal isearch-string "")
+	(setq isearch-lazy-highlight-timer
+	      (run-with-idle-timer isearch-lazy-highlight-initial-delay nil
+				   'isearch-lazy-highlight-update))))))
 
 (defun isearch-lazy-highlight-search ()
   "Search ahead for the next or previous match, for lazy highlighting.