bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#29597: 26.0.90; line-number-display-width returns incorrect width


From: Noam Postavsky
Subject: bug#29597: 26.0.90; line-number-display-width returns incorrect width
Date: Fri, 8 Dec 2017 10:37:09 -0500

On Fri, Dec 8, 2017 at 10:01 AM, Eli Zaretskii <eliz@gnu.org> wrote:

>> I understand that this function is also used internally for specific 
>> purposes, so it needs to behave a specific way to appease the initial writer 
>> of the code. But for the sake of sanity, I strongly suggest either fixing 
>> this function or creating a separate “public” function that operates vaguely 
>> in line with user expectation for those of us wanting to accommodate 
>> display-line-numbers-mode.
>
> Sorry, I don't understand what is missing.  If you wanted the value of
> 4 in your case, you need to call this function like this:
>
>   (line-number-display-width 'columns)
>
> as documented.

I think the idea would to split that function into 2 simpler ones, e.g.:

(line-number-display-columns) => 4
(line-number-display-width) => 2
(line-number-display-width t) => the equivalent in pixels





reply via email to

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