I'm trying to set a scroll margin to emacs with the scroll-margin
variable, but I've noticed that when you do that and you have display-line-numbers-mode
enabled, the scrolling doesn't work properly when coming up from the bottom of the file.
Here's a gif illustrating the issue
Notice that, when scrolling down, it scrolls properly, but, when the cursor reaches the bottom of the file, and starts going up, it doesn't respect the scroll-margin until the bottom of the file is not visible anymore.
If I disable display-line-numbers-mode
the scrolling works properly. Is there a way to achieve scroll margin along with line numbers without falling back to linum-mode
?
M-x report-emacs-bug
.scroll-margin
variable. I like to use(setq scroll-conservatively 101)
-- contrary to the posts regardingscroll-conservatively
that set the value to a hundred million trillion, anything larger than 100 will suffice.scroll-conservatively
enabled along withscroll-margin
. Notice that, when scrolling down, it does scroll "conservatively", but, when the cursor reaches the bottom of the file, and starts going up, it doesn't respect thescroll-margin
until the bottom of the file is not visible anymore.scroll-margin
is at its default setting of0
and when I have(setq scroll-conservatively 101)
and native line numbers active, I am unable to reproduce the behavior depicted in the gif that illustrates the issue. I would suggest adjustingscroll-conservatively
within the guidelines of the doc-string and leavescroll-margin
at its default setting of0
. To the extent you wish to combine the two variables to non-default specifications and you believe there is a bug, then a bug-report would be appropriate. These are things in the C code base that cannot be fixed with Lisp.