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

[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: Gregory Heytings
Subject: bug#56682: 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.





reply via email to

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