GNU bug report logs -
#7468
24.0.50; Isearch highlighting
Previous Next
Reported by: Dani Moncayo <dmoncayo <at> gmail.com>
Date: Mon, 22 Nov 2010 20:53:02 UTC
Severity: normal
Found in version 24.0.50
Done: Juri Linkov <juri <at> jurta.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 7468 <at> debbugs.gnu.org (full text, mbox):
> I've also tried to copy that section of the manual into a brand new
> buffer, but there I can't reproduce the problem.
The difference between this recipe in a normal buffer and an Info buffer
is in the line
(when (not isearch-error)
in `isearch-lazy-highlight-new-loop'. A normal Isearch starts
a new lazy highlighting loop even if there are no matches,
so it has a chance to set `isearch-lazy-highlight-last-string'.
But an Isearch in Info has the text "Initial node" in `isearch-error',
so `isearch-lazy-highlight-new-loop' doesn't set the last search string
to `isearch-lazy-highlight-last-string'.
This bug is not specific to an Isearch in Info. You can get the same bug
for a regexp Isearch in a normal buffer as:
1) Search for the regexp "foot[" (C-M-s foot[)
2) Remove the last "[" (<DEL>)
There is no lazy highlighting too.
I think this patch is a general fix for all these bug cases:
=== modified file 'lisp/isearch.el'
--- lisp/isearch.el 2010-10-02 22:37:21 +0000
+++ lisp/isearch.el 2010-11-23 01:30:44 +0000
@@ -2628,6 +2628,7 @@ (defvar isearch-lazy-highlight-case-fold
(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.
@@ -2669,9 +2670,12 @@ (defun isearch-lazy-highlight-new-loop (
(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))
+ (not (eq 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)
This bug report was last modified 14 years and 161 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.