[Top][All Lists]

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

Re: Native display of line numbers, improved

From: Alex
Subject: Re: Native display of line numbers, improved
Date: Sun, 25 Jun 2017 21:43:37 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> From: Alex <address@hidden>
>> Cc: address@hidden
>> Date: Sun, 25 Jun 2017 14:30:11 -0600
>> 1. An option to never dynamically shrink 'display-line-number-width'
>>    while still dynamically growing. I dislike having column 0 constantly
>>    changing, so an option to only grow the width dynamically like in
>>    (n)linum would be very appreciated.
> How is growing different from shrinking?  Just wondering.

Growing is necessary in the case where the width of the new line(s)
exceeds the current 'display-line-number-width'. Of course 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.

Shrinking on the other hand is never necessary.

>> 2. Building off of the above, it would be nice if there was an option to
>>    calculate the minimum line number width of a buffer when visiting it,
>>    like in linum.
> What is the definition of "the minimum line number width of a buffer"?

Sorry for being vague. What I meant was "the number of digits to display
the last line in the buffer".

For example, if the file has 10000 lines, then when visiting it
'display-line-number-width' should be immediately set to 5.

reply via email to

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