* bug#28879: 26.0.90; Narrowed line numbers shown with display-line-numbers-widen
@ 2017-10-17 20:40 Andy Moreton
2017-10-18 16:22 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: Andy Moreton @ 2017-10-17 20:40 UTC (permalink / raw)
To: 28879
From emacs -Q:
1) Open a lisp file
(setq display-line-numbers-widen t)
M-x display-line-numbers-mode
2) Move point inside a function
M-x narrow-to-defun
3) M-x widen
After (2) the window shows line numbers relative to the start of
the buffer, as expected.
After (3), the window shows line numbers starting from 1 for the
narrowed region. After the next mouse or keyboard input, the line
numbers are displayed normally.
Thus it seems that when display-line-numbers-widen is non-nil the line
numbers are not recomputed after widen until then next input.
In GNU Emacs 26.0.90 (build 9, x86_64-w64-mingw32)
of 2017-10-17 built on QUIETUS
Repository revision: 2e1b3522b8562f94a98fed07aeddb6b5ba0dbc6c
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#28879: 26.0.90; Narrowed line numbers shown with display-line-numbers-widen
2017-10-17 20:40 bug#28879: 26.0.90; Narrowed line numbers shown with display-line-numbers-widen Andy Moreton
@ 2017-10-18 16:22 ` Eli Zaretskii
2017-10-18 17:39 ` Andy Moreton
0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2017-10-18 16:22 UTC (permalink / raw)
To: Andy Moreton; +Cc: 28879
> From: Andy Moreton <andrewjmoreton@gmail.com>
> Date: Tue, 17 Oct 2017 21:40:16 +0100
>
> From emacs -Q:
> 1) Open a lisp file
> (setq display-line-numbers-widen t)
> M-x display-line-numbers-mode
> 2) Move point inside a function
> M-x narrow-to-defun
> 3) M-x widen
>
> After (2) the window shows line numbers relative to the start of
> the buffer, as expected.
>
> After (3), the window shows line numbers starting from 1 for the
> narrowed region. After the next mouse or keyboard input, the line
> numbers are displayed normally.
Right. And if your Emacs is built with --enable-checking (which is
something I advise for the first couple of pretest of a new release),
you might be able to trigger an assertion violation by repeating the
above recipe several times.
> Thus it seems that when display-line-numbers-widen is non-nil the line
> numbers are not recomputed after widen until then next input.
Actually, the numbers have been recomputed, as you see them change on
display. They just were recomputed incorrectly: the logic related to
widening failed to catch the first redisplay cycle after 'widen',
which is special. (In general, line numbers are computed as part of
displaying a window, so whenever you see redisplay, you know the line
numbers were recomputed, at least for some lines.)
Should be fixed now. Thanks for reporting this.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#28879: 26.0.90; Narrowed line numbers shown with display-line-numbers-widen
2017-10-18 16:22 ` Eli Zaretskii
@ 2017-10-18 17:39 ` Andy Moreton
2017-10-18 17:57 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: Andy Moreton @ 2017-10-18 17:39 UTC (permalink / raw)
To: 28879
On Wed 18 Oct 2017, Eli Zaretskii wrote:
>> From: Andy Moreton <andrewjmoreton@gmail.com>
>> Date: Tue, 17 Oct 2017 21:40:16 +0100
>>
>> From emacs -Q:
>> 1) Open a lisp file
>> (setq display-line-numbers-widen t)
>> M-x display-line-numbers-mode
>> 2) Move point inside a function
>> M-x narrow-to-defun
>> 3) M-x widen
>>
>> After (2) the window shows line numbers relative to the start of
>> the buffer, as expected.
>>
>> After (3), the window shows line numbers starting from 1 for the
>> narrowed region. After the next mouse or keyboard input, the line
>> numbers are displayed normally.
>
> Right. And if your Emacs is built with --enable-checking (which is
> something I advise for the first couple of pretest of a new release),
> you might be able to trigger an assertion violation by repeating the
> above recipe several times.
Good point - mine was built without it.
> Should be fixed now. Thanks for reporting this.
Confirmed fixed.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#28879: 26.0.90; Narrowed line numbers shown with display-line-numbers-widen
2017-10-18 17:39 ` Andy Moreton
@ 2017-10-18 17:57 ` Eli Zaretskii
0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2017-10-18 17:57 UTC (permalink / raw)
To: Andy Moreton; +Cc: 28879-done
> From: Andy Moreton <andrewjmoreton@gmail.com>
> Date: Wed, 18 Oct 2017 18:39:12 +0100
>
> > Should be fixed now. Thanks for reporting this.
>
> Confirmed fixed.
Thanks, closing.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-10-18 17:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-17 20:40 bug#28879: 26.0.90; Narrowed line numbers shown with display-line-numbers-widen Andy Moreton
2017-10-18 16:22 ` Eli Zaretskii
2017-10-18 17:39 ` Andy Moreton
2017-10-18 17:57 ` 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).