Obviously Emacs never scrolls "above" the first line of the buffer. By contrast, it shows a bunch of empty space after the document if you scroll to the last line:
I want to make the bottom line behave the same way; essentially similar to this question:
Note that I'm not asking for a way to prevent the window moving past the document end entirely
except I am asking for exactly that. Naturally it can't be helped if the document is shorter than the screen, but scrolling doesn't happen in that case anyways.
My scrolling setup:
(setq-default redisplay-dont-pause t
auto-window-vscroll nil
scroll-margin 10
scroll-step 1
scroll-conservatively 101
scroll-preserve-screen-position 1)
Am I right in feeling this can controlled by some variable, or do I have to modify the code from the question above?
Edit: It seems I was not clear enough in my original question. Here is a short video demonstration of the behavior I mean. Notice how when getting within the scroll margin at the top of the document, Emacs prevents movement above the document, but at the bottom it just pads the document with empty space.