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

From: Eli Zaretskii <[email-masked]>
Date: Thu, 07 Jul 2022 08:43:15 +0300

> From: Ihor Radchenko <[email-masked]>
> Cc: Gregory Heytings <[email-masked]>,  [email-masked],
>   [email-masked]
> Date: Thu, 07 Jul 2022 08:28:07 +0800
> 
> > I can help with the latter.  When Emacs is about to display some chunk
> > of text, it checks whether the text has a non-nil 'fontified'
> > property.  If it does, that chunk of text was already fontified, but
> > if not, the display engine calls font-lock (via jit-lock.el) to
> > fontify the next 1500 characters, and puts a non-nil 'fontified'
> > property on those 1500 characters.  The result is face properties,
> > which are then actually displayed.
> 
> Doesn't font-lock extend the region to be fontified to at least the full
> current line? (see font-lock-extend-region-functions and
> font-lock-extend-region-wholelines)

It's possible that this is indeed the problem.  If that's the case, we
should probably limit that widening as well.