GNU bug report logs -
#29597
26.0.90; line-number-display-width returns incorrect width
Previous Next
Reported by: Paul Rankin <hello <at> paulwrankin.com>
Date: Thu, 7 Dec 2017 05:36:02 UTC
Severity: normal
Tags: notabug
Found in version 26.0.90
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Paul Rankin <hello <at> paulwrankin.com>
> Cc: eliz <at> gnu.org
> Date: Fri, 08 Dec 2017 11:44:06 +1000
>
> I had a look in the source of display-line-numbers.el in the repo but cannot find the definition of line-number-display-width.
>
> But this is irrelevant, the line number width is clearly 4 characters, lining up with File in the menu bar.
>
> (string-width "File")
> 4
>
> It clearly fails to count to four. Adding a docstring that 2 really equals 4 is absurd.
Like I said, it behaves as designed: returns the number of digits used
to display the line number. (The source is in indent.c.) If you need
something different for your needs, the function can provide 2 other
related values, controlled by the optional; variable.
All of that is in the doc string on the release branch, and also in
the ELisp manual.
> Please don’t close bugs until they’re actually closed.
I didn't close this bug, so I'm not sure why you are asking to do
something that we always don anyway.
This bug report was last modified 7 years and 161 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.