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

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

[debbugs-tracker] bug#28854: closed (line-number-display-width erroneous


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#28854: closed (line-number-display-width erroneously returns 0 when ...)
Date: Mon, 16 Oct 2017 15:55:03 +0000

Your message dated Mon, 16 Oct 2017 18:53:44 +0300
with message-id <address@hidden>
and subject line Re: bug#28854: line-number-display-width erroneously returns 0 
when ...
has caused the debbugs.gnu.org bug report #28854,
regarding line-number-display-width erroneously returns 0 when ...
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
28854: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=28854
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: line-number-display-width erroneously returns 0 when ... Date: Sun, 15 Oct 2017 16:31:03 -0700
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



--- End Message ---
--- Begin Message --- Subject: Re: bug#28854: line-number-display-width erroneously returns 0 when ... Date: Mon, 16 Oct 2017 18:53:44 +0300
> Date: Sun, 15 Oct 2017 16:31:03 -0700
> From: Keith David Bershatsky <address@hidden>
> 
> 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.


--- End Message ---

reply via email to

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