[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Native display of line numbers, improved
From: |
Eli Zaretskii |
Subject: |
Re: Native display of line numbers, improved |
Date: |
Mon, 26 Jun 2017 18:56:03 +0300 |
> From: Stefan Monnier <address@hidden>
> Date: Mon, 26 Jun 2017 11:28:23 -0400
>
> I don't understand your comment: Alex is referring here to the approach
> used in nlinum, which I chose specifically to avoid having to scan the
> whole buffer.
I alluded to this:
> that can
> be worked around by setting 'display-line-number-width' to a
> sufficiently large number, but I would like it to be no larger than what
> it needs to be for the current text in the buffer.
I provided 'display-line-number-width' to cater to the desire of not
shrinking the width too much, and it seemed to me that if someone's
ideal is not to change the width at all, as Alex said up-thread,
counting the lines at the beginning will do that for him.
> Basically, start with a small value of display-line-number-width, and if
> during display we find that this value is too small to fit the largest
> displayed line-number, we increase it.
I wanted to avoid using a buffer-local variable settable by the
display engine. (I cannot easily use display-line-number-width,
because that's a user-settable option; I need another variable.)
- Re: Native display of line numbers, improved, (continued)
- Re: Native display of line numbers, improved, Eli Zaretskii, 2017/06/25
- Re: Native display of line numbers, improved, Alex, 2017/06/25
- Re: Native display of line numbers, improved, Alex, 2017/06/25
- Re: Native display of line numbers, improved, Eli Zaretskii, 2017/06/26
- Re: Native display of line numbers, improved, Alex, 2017/06/26
- Re: Native display of line numbers, improved, Eli Zaretskii, 2017/06/27
- Native line numbers column disappears at times, Kaushal Modi, 2017/06/29
- Re: Native line numbers column disappears at times, Eli Zaretskii, 2017/06/30
- Re: Native display of line numbers, improved, Eli Zaretskii, 2017/06/26
- Re: Native display of line numbers, improved, Stefan Monnier, 2017/06/26
- Re: Native display of line numbers, improved,
Eli Zaretskii <=
- Re: Native display of line numbers, improved, Stefan Monnier, 2017/06/26
- Re: Native display of line numbers, improved, Eli Zaretskii, 2017/06/26
- Re: Native display of line numbers, improved, Alex, 2017/06/26