GNU bug report logs - #29597
26.0.90; line-number-display-width returns incorrect width

Previous Next

Package: emacs;

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: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: Paul Rankin <hello <at> paulwrankin.com>
Cc: eliz <at> gnu.org, 29597 <at> debbugs.gnu.org
Subject: bug#29597: 26.0.90; line-number-display-width returns incorrect width
Date: Thu, 07 Dec 2017 21:00:21 -0500
Paul Rankin <hello <at> paulwrankin.com> writes:

> 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.

Here's the help text:

    line-number-display-width is a built-in function in ‘C source code’.

    (line-number-display-width &optional PIXELWISE)

    Return the width used for displaying line numbers in the selected window.
    If optional argument PIXELWISE is the symbol ‘columns’, return the width
    in units of the frame’s canonical character width.  In this case, the
    value is a float.
    If optional argument PIXELWISE is t or any other non-nil value, return
    the width as an integer number of pixels.
    Otherwise return the value as an integer number of columns of the face
    used to display line numbers, ‘line-number’.  Note that in the latter
    case, the value doesn’t include the 2 columns used for padding the
    numbers on display.




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.