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

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

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


From: Eli Zaretskii
Subject: bug#56682: Fix the long lines font locking related slowdowns
Date: Mon, 01 Aug 2022 18:49:30 +0300

> Date: Mon, 01 Aug 2022 15:08:42 +0000
> From: Gregory Heytings <gregory@heytings.org>
> cc: gerd.moellmann@gmail.com, 56682@debbugs.gnu.org, larsi@gnus.org, 
>     monnier@iro.umontreal.ca
> 
> > Or perhaps we should check that using window-point indeed brings 
> > pos.charpos into the narrowed region, and only use pos.charpos if it 
> > doesn't?
> >
> 
> I changed this into:
> 
>    if (current_buffer->long_line_optimizations_p)
>      {
>        if (!it->narrowed_begv)
>          {
>            it->narrowed_begv = get_narrowed_begv (it->w, window_point 
> (it->w));
>            it->narrowed_zv = get_narrowed_zv (it->w, window_point (it->w));
>          }
>        else if ((pos.charpos < it->narrowed_begv || pos.charpos > 
> it->narrowed_zv)
>                  && (!redisplaying_p || it->line_wrap == TRUNCATE))
>          {
>            it->narrowed_begv = get_narrowed_begv (it->w, pos.charpos);
>            it->narrowed_zv = get_narrowed_zv (it->w, pos.charpos);
>          }
>      }
> 
> which seems better indeed.  Is that okay from your point of view?

Yes, thanks.





reply via email to

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