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

preserve horizontal scroll position #33

Open Nick-the-freak opened 6 months ago

Nick-the-freak commented 6 months ago

I wonder if anyone also wanted this and sorry if it's a duplicate. It could be helpful to be able to keep the horizontal position instead of sticking to the left most. Thanks in advance!

vanowm commented 4 months ago

Note, it doesn't "stick to the left most", but rather it scrolls to the last character. So, if file ends with a newline, it will scroll to the left, otherwise it will scroll to the right of last line.

I also found in need an option to keep horizontal scroll position. My log files contain JSON with array of objects, where each object is a long single line, and it scrolling to the right making it very disrupting.

vanowm commented 4 months ago

It seems I was wrong. It scrolls to cursor position. as long as cursor is in view, it won't scroll horizontally, unless added line is shorter...

It seems it's not possible https://github.com/microsoft/vscode/issues/105625