PejmanNik / vscode-autoScroll

AutoScroll extension for VS Code
https://marketplace.visualstudio.com/items?itemName=pejmannikram.vscode-auto-scroll
MIT License
23 stars 6 forks source link

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

Open DougChandler opened 1 year ago

DougChandler commented 1 year ago

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.

PejmanNik commented 1 year ago

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

Hipska commented 7 months ago

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

vanowm commented 4 months ago

And checking if user manually scrolled up:

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

(don't really need onscroll event handler)