Subject: Re: bug#28854: line-number-display-width erroneously returns 0 when ...
From: Eli Zaretskii <[email-masked]>
To: Keith David Bershatsky <[email-masked]>
Cc: [email-masked]
Date: Mon, 16 Oct 2017 18:53:44 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> Date: Sun, 15 Oct 2017 16:31:03 -0700
> From: Keith David Bershatsky <[email-masked]>
> 
> line-number-display-width erroneously returns 0 when at the end of a very long line and `truncate-lines` is non-nil.

More accurately, when the first line visible in the window is
completely hscrolled out of view.

> STEP #1:  Launch a current version of the master branch without any user configuration; i.e., emacs -q.
> 
> STEP #2:  (setq truncate-lines t)
> 
> STEP #3:  (display-line-numbers-mode 1)
> 
> STEP #4:  Create a long line that is about 3 times the width of the window.  With point at the end of that line, evaluate:
> 
> (line-number-display-width 'pixelwise)
> 
> The result returned is 0, which is incorrect.

Thanks, fixed on the release branch.