[Top][All Lists]

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

Re: Native display of line numbers

From: Eli Zaretskii
Subject: Re: Native display of line numbers
Date: Sat, 24 Jun 2017 10:18:49 +0300

> From: Stefan Monnier <address@hidden>
> Date: Fri, 23 Jun 2017 17:24:45 -0400
> >> Indeed, to make it fast enough it probably needs to count lines using
> >> the matrices rather than the buffer.
> > No, I cannot use the glyph matrices, because the line numbers are
> > generated when the glyph matrix is created, and because the previous
> > matrix cannot be trusted in general.
> Can't you fill the glyph matrix with some filler while building the
> matrix and at the end go back to put the line numbers?

That'd be problematic, because the only interpretation of "at the end"
I can come up with is "just before calling update_frame", since there
are a lot of shortcuts in the display engine which all lead to that

Doing this at that point would mean potentially invalidating the
decisions already made by the display engine during its traversal of
the window tree.  E.g., screen lines that seemed to be unchanged will
now become changed due to changes in line numbers.  So this would
require an immediate second redisplay cycle, which runs afoul of my
attempt to speed up redisplay with line numbers.

> > I need to use the move_it_in_display_line_to and its ilk instead.
> That will make it costly, indeed.

We shall see.  Every "normal" redisplay already calls these functions
for movement within the window limits, so it cannot be too slow.

reply via email to

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