Subject: Re: bug#56815: 29.0.50; Isearch lazy-highlight highlights too much when truncate-lines is in effect

From: Gregory Heytings <[email-masked]>
Date: Sun, 31 Jul 2022 21:21:05 +0000

>>> And yes, if we want truncate-lines to work reasonably well, we need to 
>>> fix any features which behave silly in that display mode.
>>
>> If we want truncate-lines to work reasonably well without fixing all 
>> such features one-by-one, we need to fix the root cause of that 
>> dysfunction, which is not inside these individual features, but is the 
>> fact that (- (window-end) (window-start)) is huge.
>
> Do you think introducing the rectangular narrowing could be a more 
> general fix? We already have rectangular regions generalized as 
> non-contiguous regions. Could non-contiguous narrowing help to restrict 
> the accessible buffer area to the visible screen rectangle?
>

Yes, I think so.  But I also think it would be wrong to do that.  That 
would be an enormous change to the code (wherever we use BEGV and ZV we 
would have to use instead two arrays BEGV[] and ZV[]) for a microscopic 
use case, and it wouldn't even solve the problem completely, because the 
largest possible line width is limited to about 200 MB anyway (because its 
width in pixels is stored in an int).