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

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

bug#22763: 25.1.50; Feature Request -- A faster method to obtain line nu


From: Eli Zaretskii
Subject: bug#22763: 25.1.50; Feature Request -- A faster method to obtain line number at position.
Date: Sun, 07 Feb 2021 22:50:29 +0200

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: Eli Zaretskii <eliz@gnu.org>,  22763@debbugs.gnu.org,  esq@lawlist.com
> Date: Sun, 07 Feb 2021 21:42:30 +0100
> 
> Why does display_count_lines (with no cache) exist, then?

It exists to support the line-number display on the mode line.  That
display has its own cache, as part of the window object, so
display_count_lines very rarely needs to count from the beginning of
the buffer, it usually counts from the last place it stopped the
previous time for the same window.  This is why it has the signature
that it has.





reply via email to

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