bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#13402: 24.2.92 pretest: bugs in isearch-yank-line in info page. [Pat


From: Juri Linkov
Subject: bug#13402: 24.2.92 pretest: bugs in isearch-yank-line in info page. [Patch]
Date: Sat, 16 Feb 2013 23:50:39 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)

> OK, here's a better patch.  As already suggested, every match now has its
> lazy-highlight overlay, just that the one overlapping the current match
> no longer has the 'face property set.  I don't think there can be more
> than one overlapping match.  This approach preserves the optimisation
> with `C-s'.

Yes, this is a more reliable approach, and it works correctly now in isearch.
It fails only in `replace-highlight', i.e. after running `query-replace'
and answering `n' to skip to the next match, it doesn't re-highlight
the previous skipped match.

But in principle I don't oppose your approach provided it's working
correctly in all cases.

While testing I noticed an interesting effect.  Test case:

emacs -Q
Eval (info "(elisp) Syntax Table Internals")
Place point at the start of the second paragraph
("   Each entry in a ....").
Type `C-s C-w C-w' that puts " each" to the search string.

Type another C-s (isearch-repeat-forward) that will go to the second
match of " each" (try to use a smaller font to be able to see both
matches of the string " each" on the same screen).

As soon as the cursor leaves the first match, its highlighting
(with a different color for a lazy match) grows to a wider region
previously hidden by your patch.

This indicates that surprises will remain even after using your approach.
Another case surprising to users is reversing the search direction -
e.g. when the cursor is on the second match, type `C-r' and see how
the lazy-highlighted first match shrinks from multi-line to single-line.
It seems nothing can be done to fix this case.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]