[Top][All Lists]

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

Re: Native line numbers, final testing

From: Eli Zaretskii
Subject: Re: Native line numbers, final testing
Date: Fri, 30 Jun 2017 22:55:24 +0300

> From: Alex <address@hidden>
> Cc: address@hidden
> Date: Fri, 30 Jun 2017 13:06:27 -0600
> >> If the current line number is at least 4 digits long, then the text in
> >> the current line is shifted over.
> >
> > Thanks, but I don't understand what you mean, and I tried one file
> > with 5-digit line number and didn't see what I think you described.
> >
> > Can you show a screenshot?  Are you using some special font where this
> > happens?
> I forgot that just before testing relative line numbers, I set
> `display-line-number-width' to a non-nil value. For immediate results,
> try setting it to 0 and hit C-n/C-p a few times.

Ah, okay.  Thanks, should be fixed now.

(Btw zero is not valid as the value of display-line-number-width,
although the code before the last changes mistakenly tried using it.
Starting from now, zero and any other non-positive value are
interpreted as nil.)

> P.S. I noticed that with display-line-numbers set to 'visual, goto-line
> is much slower compared to 'relative. Is this expected?

Yes.  The initial naïve implementation was unbearably slow, but I was
lucky to find a shortcut.  It is still sometimes slow, and a few
redisplay optimizations are disabled with this mode, because moving
point vertically needs to redisplay the entire window, since the line
numbers change.  If someone has ideas for speeding it up, I'm all

At least it is significantly faster than the only add-on package which
implemented something similar to visual mode.

reply via email to

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