Mercurial > emacs
diff lisp/isearch.el @ 89971:cce1c0ee76ee
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-36
Merge from emacs--cvs-trunk--0, emacs--gnus--5.10, gnus--rel--5.10
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Merge from emacs--gnus--5.10, gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-524
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-534
Update from CVS
* miles@gnu.org--gnu-2004/emacs--gnus--5.10--base-0
tag of miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-464
* miles@gnu.org--gnu-2004/emacs--gnus--5.10--patch-1
Import from CVS branch gnus-5_10-branch
* miles@gnu.org--gnu-2004/emacs--gnus--5.10--patch-2
Merge from lorentey@elte.hu--2004/emacs--multi-tty--0, emacs--cvs-trunk--0
* miles@gnu.org--gnu-2004/emacs--gnus--5.10--patch-3
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--gnus--5.10--patch-4
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-18
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-19
Remove autoconf-generated files from archive
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-20
Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Thu, 09 Sep 2004 09:36:36 +0000 |
parents | 3219f94257bc 862d0c555534 |
children | 566253900690 |
line wrap: on
line diff
--- a/lisp/isearch.el Sun Sep 05 01:53:47 2004 +0000 +++ b/lisp/isearch.el Thu Sep 09 09:36:36 2004 +0000 @@ -2358,9 +2358,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. @@ -2397,7 +2398,17 @@ (let ((mb (match-beginning 0)) (me (match-end 0))) (if (= mb me) ;zero-length match - (forward-char 1) + (if isearch-forward + (if (= mb (if isearch-lazy-highlight-wrapped + isearch-lazy-highlight-start + (window-end))) + (setq found nil) + (forward-char 1)) + (if (= mb (if isearch-lazy-highlight-wrapped + isearch-lazy-highlight-end + (window-start))) + (setq found nil) + (forward-char -1))) ;; non-zero-length match (let ((ov (make-overlay mb me))) @@ -2407,19 +2418,20 @@ (push ov isearch-lazy-highlight-overlays))) (if isearch-forward (setq isearch-lazy-highlight-end (point)) - (setq isearch-lazy-highlight-start (point)))) + (setq isearch-lazy-highlight-start (point))))) - ;; not found - (if isearch-lazy-highlight-wrapped - (setq looping nil - nomore t) - (setq isearch-lazy-highlight-wrapped t) - (if isearch-forward - (progn - (setq isearch-lazy-highlight-end (window-start)) - (goto-char (window-start))) - (setq isearch-lazy-highlight-start (window-end)) - (goto-char (window-end))))))) + ;; not found or zero-length match at the search bound + (if (not found) + (if isearch-lazy-highlight-wrapped + (setq looping nil + nomore t) + (setq isearch-lazy-highlight-wrapped t) + (if isearch-forward + (progn + (setq isearch-lazy-highlight-end (window-start)) + (goto-char (window-start))) + (setq isearch-lazy-highlight-start (window-end)) + (goto-char (window-end))))))) (unless nomore (setq isearch-lazy-highlight-timer (run-at-time isearch-lazy-highlight-interval nil