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

Also remember the scroll position #6

Open
frantic opened this issue Sep 6, 2017 · 2 comments
Open

Also remember the scroll position #6

frantic opened this issue Sep 6, 2017 · 2 comments

Comments

@frantic
Copy link

frantic commented Sep 6, 2017

This plugin is great! However, it would be even better if it also restored the scroll position.

E.g. suppose the viewport is 3 lines tall and user is editing line 03 and it's in the center of their viewport.

01
-- top of the screen
02
03  cursor |
04
-- bottom of the screen
05
06
07

When they jump to line 07 and then press Ctrl+I, they end up in this situation:

-- top of the screen
01
02
03  cursor |
-- bottom of the screen
04
05
06
07
@frantic
Copy link
Author

frantic commented Sep 6, 2017

Looks like getScrollTop and setScrollTop could help. I'll try to look into this…

@plrenaudin
Copy link
Owner

Thank you very much for the suggestion. I guess it is possible to do so indeed.
PR are more than welcome!

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

No branches or pull requests

2 participants