GNU bug report logs - #56682
Fix the long lines font locking related slowdowns

Previous Next

Package: emacs;

Reported by: Gregory Heytings <gregory <at> heytings.org>

Date: Thu, 21 Jul 2022 18:01:01 UTC

Severity: normal

Done: Gregory Heytings <gregory <at> heytings.org>

Bug is archived. No further changes may be made.

Full log


Message #1762 received at 56682 <at> debbugs.gnu.org (full text, mbox):

From: Gregory Heytings <gregory <at> heytings.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 56682 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, dgutov <at> yandex.ru
Subject: Re: locked narrowing (was: bug#56682: Fix the long lines font locking
 related slowdowns)
Date: Tue, 16 Aug 2022 20:23:46 +0000
Another comment:

>
> diff --git a/nlinum.el b/nlinum.el
> index 4f0e02fef1..3feaaca5c3 100644
> --- a/nlinum.el
> +++ b/nlinum.el
> @@ -312,7 +312,7 @@ Only works right if point is at BOL."
>   (if nlinum-widen
>       (save-excursion
>         (save-restriction
> -          (widen)
> +          (REALLY-widen)
>           (forward-line 0)              ;In case (point-min) was not at BOL.
>           (let ((nlinum-widen nil))
>             (nlinum--line-number-at-pos))))
>

FWIW, that's not a good example, because it's a bad idea to calculate line 
numbers in buffers with long lines or with too many lines: it takes too 
much time.




This bug report was last modified 2 years and 8 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.