Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smooth scrolling doesn't work if line partially off screen #37

Closed
countvajhula opened this issue Apr 9, 2017 · 4 comments
Closed

Smooth scrolling doesn't work if line partially off screen #37

countvajhula opened this issue Apr 9, 2017 · 4 comments
Labels

Comments

@countvajhula
Copy link

countvajhula commented Apr 9, 2017

I'm using Mitsuharu Yamamoto's Emacs for Mac, which supports pixel-level (as opposed to line-by-line) scrolling. I've noticed that when the page is resting on a non-line boundary (i.e. a line is only partially visible with part of it off screen), moving the cursor onto that last (or first) line causes the page to skip the way it does by default without sublimity. If on the other hand the cursor is on a line that is fully on screen, sublimity smooth scrolling kicks in and it doesn't skip.

It ought to smooth-scroll in either case.

@countvajhula countvajhula changed the title Smooth scrolling doesn Smooth scrolling doesn't work if non-line boundary Apr 9, 2017
@countvajhula countvajhula changed the title Smooth scrolling doesn't work if non-line boundary Smooth scrolling doesn't work if line partially off screen Apr 9, 2017
@zk-phi
Copy link
Owner

zk-phi commented Apr 10, 2017

thanks for reporting :)

do you mean this behavior ?

screencast

@countvajhula
Copy link
Author

@zk-phi Thanks for the fast response. I can't really tell in that animation, but you could do it this way:

  1. Open a long file with say >100 lines
  2. smooth scroll the first page so that the bottom line is partially on screen (i.e. there should still be many pages to go after this one)
  3. move the cursor to the bottom line using C-n
  4. The screen jumps instead of smooth scrolling

Let me know if that works, thanks!

@zk-phi
Copy link
Owner

zk-phi commented Apr 12, 2017

Thanks, I'll inspect later :)

@obar
Copy link
Contributor

obar commented May 29, 2020

I filed a similar bug at #55. I think this is a sub-issue, as a user should be able to specify a scroll-margin (or similar, sublimity-scroll-margin perhaps) so when the point is near the window boundary there can be a scroll action.

I don't have a fix for the general case of a scroll margin, but I did submit a pull request that solves the partial line scroll issue described here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants