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

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

bug#56815: 29.0.50; Isearch lazy-highlight highlights too much when trun


From: Juri Linkov
Subject: bug#56815: 29.0.50; Isearch lazy-highlight highlights too much when truncate-lines is in effect
Date: Thu, 28 Jul 2022 23:08:23 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

> To reproduce, visit any file with very long lines, turn on
> truncate-lines, and invoke Isearch. after typing some search string
> for which there are matches in the buffer, Isearch will highlight many
> matches that are not visible in the window.  In an extreme case where
> a file has a single very long line, all the matches in the buffer will
> be highlighted.  This both takes long time, and slows down many
> display-related commands, because the large number of overlays created
> for the highlighting slows down redisplay.
>
> This happens because isearch.el uses window-end as the limit beyond
> which to stop highlighting, but that is a poor indicator of visibility
> in buffers under truncate-lines.
>
> If isearch.el cannot find a better criterion for stopping highlighting
> beyond some buffer position, it should at least use some reasonable
> fixed (or customizable) limit.  Another possibility is to turn off
> lazy-highlight by default when truncate-lines is turned on.
>
> This issue is related to poor Emacs performance in buffers with very
> long lines, and its fix is essential for making Emacs more usable with
> such buffers.

I didn't follow the new design of long lines handling.
Does it just narrow each long truncated line?
When narrowing is in effect then lazy-highlight
should already do the right thing since it can't go
outside of the narrowed regions.





reply via email to

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