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

Sublime Text Auto-Scrolls to Top After Switching Applications #6570

Closed
syed-m-owais opened this issue Dec 25, 2024 · 8 comments
Closed

Sublime Text Auto-Scrolls to Top After Switching Applications #6570

syed-m-owais opened this issue Dec 25, 2024 · 8 comments

Comments

@syed-m-owais
Copy link

Description of the bug

While working in the middle of a file, I save the file and check the browser. When I switch back to Sublime, it always scrolls to the top, and I have to scroll down to where I was working. This happens every time.

Steps to reproduce

1 - Open a file in Sublime Text.
2 - Navigate to the middle of the file and start editing.
3 - Save the file using Ctrl+S (or the equivalent save shortcut).
4 - Switch to the browser to check the changes.
5 - Return to Sublime Text.
6 - Observe that Sublime Text scrolls back to the top of the file.
7 - Scroll back down manually to find the section where you were working.

Expected behavior

Sublime should stay where I left it; it should not auto-scroll anywhere.

Actual behavior

While working in the middle of a file, I save the file and check the browser. When I switch back to Sublime, it always scrolls to the top, and I have to scroll down to where I was working. This happens every time.

Sublime Text build number

4189

Operating system & version

Windows 10

(Linux) Desktop environment and/or window manager

No response

Additional information

No response

OpenGL context information

No response

@syed-m-owais syed-m-owais changed the title Auto Scroll on window change Sublime Text Auto-Scrolls to Top After Switching Applications Dec 25, 2024
@BenjaminSchaaf
Copy link
Member

Does it happen in safe mode?

@twinysam
Copy link

@BenjaminSchaaf I'm experiencing the same (same build, same OS) and no, just tested it and it doesn't happen in safe mode.

@BenjaminSchaaf
Copy link
Member

@twinysam since it's not happening in safe mode this is likely due to a plugin you've installed or a specific combination of settings. I suggest using the "ignored_packages" setting to temporarily disable your plugins to narrow down the culprit.

@Sam-Durrant
Copy link

The error apparently occurs specifically with the Adaptive theme. I removed all plugins, leaving only the Control package. He also demonstrated his minimal settings, there is no scrolling in the standard theme, but there is scrolling in the Adaptive theme.

I also ask you to check the search window, why is it so small and is designed for one line, although I can select 2 or 3 or more. It was better before.

bandicam-2025-01-08-23-01-47-230_gNLsT3y9.mp4

@twinysam
Copy link

twinysam commented Jan 8, 2025

Can confirm, I have the adaptive theme and use no packages. This wasn't happening in the previous version, I've been using this theme for at least a few years.

@Sam-Durrant
Copy link

Yes, I have also been using this Adaptive theme for a long time. Now, due to an error, I temporarily had to switch to Default Dark

@deathaxe
Copy link
Collaborator

deathaxe commented Jan 9, 2025

It appears to be caused by or related with word-wrapped lines, which are not correctly taken into account when restoring window, if themed title bar is used.

Disabling either automatic word-wrapping or setting "themed_title_bar": false, (with Adaptive theme), causes scroll position to be correctly restored.

Tested with ST4190 in SAFE MODE on Win11 23H2 with Windows' and ST's UI scaling set to 1.0.

@BenjaminSchaaf
Copy link
Member

Fixed in build 4191.

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

No branches or pull requests

5 participants