sublimity
sublimity copied to clipboard
Smooth scrolling doesn't consistently respect scroll boundaries
Other scroll commands work with sublimity-scroll
, but I have issues with C-n
at the bottom of a window. C-p
at the top operates as expected.
This was a head-scratcher, but after digging into it a bit, I believe the criteria for scrolling doesn't work as expected for partial lines of text at the bottom of the window, which is never an issue at the top as it starts with a completely visible line. Sublimity doesn't expect to scroll yet when C-n
moves point to that partially visible line, but emacs scrolls it to visible anyway edit to clarify: without smooth scrolling behavior. Per the documentation of window-end
used in the criteria:
Note that the position it returns might be only partially visible.
Other motion that ends on a partially visible line would result in the same problem (eg, forward-paragraph
) but one doesn't run into that condition as often.
I have a fix for this particular problem and will submit a pull request. It's not perfect as the method I used doesn't take into account scroll-margin
—if that's non-zero then motion into those margins at the window boundaries will not give smooth scrolling.