* bug#28854: line-number-display-width erroneously returns 0 when ...
@ 2017-10-15 23:31 Keith David Bershatsky
2017-10-16 15:53 ` Eli Zaretskii
0 siblings, 1 reply; 2+ messages in thread
From: Keith David Bershatsky @ 2017-10-15 23:31 UTC (permalink / raw)
To: 28854
line-number-display-width erroneously returns 0 when at the end of a very long line and `truncate-lines` is non-nil.
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.
BACKGROUND: I am working on developing crosshairs as part of feature requests #17684 and #22873, and I need the line number display width (pixelwise) to accurately calculate when the horizontal ruler should begin to draw -- i.e., it.current_x + lnum_pixel_width = start drawing ... I am also enabling compatibility with the fnctions scroll-right and scroll-left, and when horizontal scrolling the current line.
Thanks,
Keith
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#28854: line-number-display-width erroneously returns 0 when ...
2017-10-15 23:31 bug#28854: line-number-display-width erroneously returns 0 when Keith David Bershatsky
@ 2017-10-16 15:53 ` Eli Zaretskii
0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2017-10-16 15:53 UTC (permalink / raw)
To: Keith David Bershatsky; +Cc: 28854-done
> Date: Sun, 15 Oct 2017 16:31:03 -0700
> From: Keith David Bershatsky <esq@lawlist.com>
>
> 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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-16 15:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-15 23:31 bug#28854: line-number-display-width erroneously returns 0 when Keith David Bershatsky
2017-10-16 15:53 ` Eli Zaretskii
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).