[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#56682: locked narrowing (was: bug#56682: Fix the long lines font loc
From: |
Eli Zaretskii |
Subject: |
bug#56682: locked narrowing (was: bug#56682: Fix the long lines font locking related slowdowns) |
Date: |
Wed, 17 Aug 2022 14:28:39 +0300 |
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: dgutov@yandex.ru, 56682@debbugs.gnu.org, gregory@heytings.org
> Date: Tue, 16 Aug 2022 15:18:23 -0400
>
> 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))))
If a package wants to count lines in a function registered with
jit-lock, I think it makes no sense for it to do that in Lisp. It
would be much better to let such packages use the built-in
capabilities that we use all the time, both on the mode line and under
display-line-numbers mode. There are at least two advantages to that:
(1) it will be at least slightly faster, sometimes more than slightly
(due to caching); and (2) the problem of narrowing would be seamlessly
resolved.
- bug#56682: Fix the long lines font locking related slowdowns, (continued)
- bug#56682: Fix the long lines font locking related slowdowns, Stefan Monnier, 2022/08/16
- bug#56682: Fix the long lines font locking related slowdowns, Eli Zaretskii, 2022/08/16
- bug#56682: locked narrowing (was: bug#56682: Fix the long lines font locking related slowdowns), Stefan Monnier, 2022/08/16
- bug#56682: locked narrowing (was: bug#56682: Fix the long lines font locking related slowdowns), Gregory Heytings, 2022/08/16
- bug#56682: locked narrowing, Stefan Monnier, 2022/08/16
- bug#56682: locked narrowing, Gregory Heytings, 2022/08/16
- bug#56682: locked narrowing (was: bug#56682: Fix the long lines font locking related slowdowns), Gregory Heytings, 2022/08/16
- bug#56682: locked narrowing, Stefan Monnier, 2022/08/16
- bug#56682: locked narrowing, Stefan Monnier, 2022/08/16
- bug#56682: locked narrowing, dick, 2022/08/17
- bug#56682: locked narrowing (was: bug#56682: Fix the long lines font locking related slowdowns),
Eli Zaretskii <=
- bug#56682: locked narrowing, Stefan Monnier, 2022/08/17
- bug#56682: locked narrowing, Eli Zaretskii, 2022/08/17
- bug#56682: locked narrowing, Stefan Monnier, 2022/08/17
- bug#56682: locked narrowing, Eli Zaretskii, 2022/08/17
- bug#56682: locked narrowing, Stefan Monnier, 2022/08/17
- bug#56682: locked narrowing, Eli Zaretskii, 2022/08/17
- bug#56682: locked narrowing, Stefan Monnier, 2022/08/17
- bug#56682: locked narrowing, Eli Zaretskii, 2022/08/17
- bug#56682: locked narrowing, Eli Zaretskii, 2022/08/17
- bug#56682: locked narrowing, Stefan Monnier, 2022/08/17