Subject: Re: bug#56393: Actually fix the long lines display bug

From: Eli Zaretskii <[email-masked]>
Date: Thu, 07 Jul 2022 22:05:18 +0300

> Date: Thu, 07 Jul 2022 18:46:53 +0000
> From: Gregory Heytings <[email-masked]>
> cc: [email-masked], [email-masked]
> 
> By the way, that's a problem I see with the idea of computing the 
> narrowing dynamically by multiplying window-body-width by 
> window-total-height.  If a buffer is displayed in two windows, a small one 
> and a larger one, and we navigate the buffer in the smaller one, the 
> larger one will display only a part of what it could display.

If you are saying the above in the context of my proposal to implement
the "narrowing" such that it's only visible to redisplay, then I see
no problem: redisplay_window is called separately for each window, and
so the "narrowing" will be computed separately and differently for
each one of them.  (Which might, btw, mean we will see each window
with slightly different fontifications, if we limit font-lock to the
same restriction.  Something to keep in mind for later, I suppose.)

If you are saying the above in the context of the current
auto-narrow-mode, then it shouldn't be hard to loop over all the
windows showing the same buffer and choose the widest narrowing of
them all.  Or am I missing something?