Subject: bug#56682: Fix the long lines font locking related slowdowns

From: Eli Zaretskii <[email-masked]>
Date: Mon, 01 Aug 2022 19:34:44 +0300

This hunk:

> @@ -8894,7 +8891,7 @@ get_visually_first_element (struct it *it)
>  				find_newline_no_quit (IT_CHARPOS (*it),
>  						      IT_BYTEPOS (*it), -1,
>  						      &it->bidi_it.bytepos),
> -				it->narrowed_begv);
> +				get_closer_narrowed_begv (it->w, IT_CHARPOS (*it)));
>        bidi_paragraph_init (it->paragraph_embedding, &it->bidi_it, true);
>        do
>  	{

isn't quite right, I think.

Can you explain which, if any, problems you saw or had in mind, and
what and how did you want to fix them with this particular hunk?  I'd
then suggest a better change (or agree with your change, in case I
missed something).

Thanks.