emacs-devel
[Top][All Lists]
Advanced

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

Re: Display window line numbers


From: Juri Linkov
Subject: Re: Display window line numbers
Date: Tue, 06 Dec 2022 20:43:30 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

> You could set `display-line-numbers' to 'absolute and run code below every
> time the window is scrolled up/down (e.g. with a hook):
>
> (save-excursion
>   (move-to-window-line 0)
>   (setq display-line-numbers-offset
>            (* -1
>               (line-number-at-pos))))

Thanks, adding this to `window-scroll-functions' displays correct
line numbers.  But only when the same buffer is not displayed
in two windows.



reply via email to

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