GNU bug report logs -
#28844
26.0.90; display-line-numbers-mode should call window-configuration-change-hook
Previous Next
Reported by: Paul Rankin <hello <at> paulwrankin.com>
Date: Sun, 15 Oct 2017 07:57:01 UTC
Severity: minor
Found in version 26.0.90
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Simple point movements (for some value of "simple") don't affect the
> width used for line numbers.
Yes. I forgot that this will affect the window start position as well
in all cases the OP could be interested in.
> I actually don't understand why a hook is needed. If a Lisp
> application wants/needs to be sensitive to the width of the
> line-number display, it should simply call line-number-display-width
> each time it needs to know the value. This function is guaranteed to
> return zero when display-line-numbers is nil, and it's also guaranteed
> (barring bugs ;-) to return the exact same value as what the display
> engine will use, provided that the window-start doesn't move between
> the call to line-number-display-width and when you need to use the
> value. So it will correctly reflect any changes in the width used for
> the line numbers.
>
> What am I missing?
Probably nothing. IIUC your code also handles adding/removing text that
would increase/decrease the line numbers width while leaving the window
start position alone.
martin
This bug report was last modified 7 years and 166 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.