PejmanNik/vscode-autoScroll

Would Be Useful to Only Auto Scroll When At The Bottom Of The File

Opened this issue · 3 comments

A suggestion:
If you are watching a log file and want to scroll up to see some of the history, you have to disable AS then go up. It would be very useful to only Auto-Scroll when viewing the end of the file, i.e. if I scroll up and not viewing the end of the file, don't auto-scroll, but then when I want to continue, ctrl+end to go to the bottom and then auto-scroll again... I've seen this in other software, can't remember which as it was some time ago, but it would be very useful.

That is a great suggestion, I'm open to a PR for that. it must be a straightforward implementation with VsCode SelectionChange events.

Came here to mention I want this feature as well..

And checking if user manually scrolled up:

const isScrolledToBottom = elContainer.scrollTop === (elContainer.scrollHeight - elContainer.offsetHeight)

(don't really need onscroll event handler)