-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
Option to keep file selected in sidebar without forcing a scroll #23902
Comments
@clounie so what is missing when you set explorer.autoReveal to false? |
You can't tell what file in the tree is currently focused in the editor, or where it is in the tree. This is because the file highlighted in the sidebar doesn't change unless you manually click to make it so, when |
@clounie ok I understand your request now, you want to select the file but without scrolling (unless needed). |
Yes - if any scrolling is needed, the user should do it. |
Agree with @clounie. If Auto-revealing is unwanted because of file tree jumping, not because of highlighting active files. |
+1 one from me on this please. |
+1 |
+1, I want the file highlighted in explorer but the scroll position not changed |
+1, it's sometimes hard to figure out which file you have open when they're all named |
I recently switched to VSCode from Atom and I really find this behaviour confusing. Would be really cool to see this land 👍 |
+1, really need to improve this behavior. I switched from sublime to vscode, this makes me crazy. |
+1 The editor should not force a scroll by default. It's very distracting. |
+1 This is really a needed usability feature. |
+1 This is very frustrating. If I have scrolled down in sidebar and then close the tab, it scrolls me back up to the position of the next active tab. Please fix this. |
+1 Been a couple of years for a simple option to prevent a part of an existing feature; should be simple enough to implement? EDIT: Looks like the operation is happening here:
One option is to add another settings option, such as autoRevealNoScroll, and add it to the existing check:
The relevant tree function seem to be in:
|
I see that there's some debate in the PR so I just wanted to add a +1 in support of this fix. I actually keep unneeded files open sometimes, if I know I'm going to be touching an adjacent file next, just so that I can make sure I don't have to scroll back in the project to where I was. Thank you @phuein for putting the fix together! A nice potential additional feature would be the ability to do something like right-click a file's tab, and have an option in the context menu to update the left scrollbar's position to that file. Then, on the rare occasion that I do care if the two are in sync, it would be just a couple of clicks away. Actually the feature above is already there! "Reveal in Side Bar." So never mind. I'll leave the above text here in case it helps anyone else once this PR goes live. |
Thanks to @phuein this is now supported in VS Code. To verify:
|
Awesome to see this merged! The new option is called |
I renamed it to |
Ah, got it – thanks! 🙂 |
This is closely related to #14745.
Summary:
I want the selected file in the sidebar to always be my active tab - but do not want the sidebar to scroll just because the file is currently not visible in the sidebar.
That scrolling is the entire reason I turned off
autoReveal
in the first place.Options Not Used + Why:
The text was updated successfully, but these errors were encountered: