emacs-devel
[Top][All Lists]
Advanced

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

Re: Colorful line numbers


From: Eli Zaretskii
Subject: Re: Colorful line numbers
Date: Sat, 23 Jul 2022 20:07:42 +0300

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: joaotavora@gmail.com,  emacs-devel@gnu.org
> Date: Sat, 23 Jul 2022 12:31:52 -0400
> 
> So adding a text property for the line numbers's face would (in
> the worst case) add 2 "handle stop-points" per line (could be reduced
> to one by making those properties cover the whole "line plus newline"
> so there's only one stop-point between them).
> 
> Could that really cause a measurable slow down?

Depends on what else is in the buffer.  If "one more stop-point per
line" adds significantly to the number of stop-point (which I think it
will in many cases, as code typically has few different faces per
line), it will be measurable, yes.

And using text properties for this kind of information is really not
clean.  It also comes with technical problems, because text properties
cannot overlap.  As I wrote earlier, I'd much prefer some buffer-local
variable.



reply via email to

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