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

Opening folders with shellexecute-on-windows feature doesn't respect to 'expand to open folder' setting #103

Closed
Legend-Master opened this issue Nov 14, 2024 · 2 comments · Fixed by #104

Comments

@Legend-Master
Copy link
Contributor

A small thing, after #98, when opening folders with the current implementation, the left panel of the file explorer will expand the folder to the current location, and I find it being quite annoying, the old implementation using open as operation (it's explorer now) doesn't have this problem

I found that using SHOpenFolderAndSelectItems like this SHOpenFolderAndSelectItems(folder, Some(&[folder]), 0) will open that folder without expanding the left panel, and I don't think this will cause the explorer to freeze, do you think we can make a change to use it instead?

I'm willing to contribute the code if you will

@Byron
Copy link
Owner

Byron commented Nov 14, 2024

Thanks for posting!

It's hard for me to understand why it would be annoying for lack of experience, but even without that it's clear that the new implementation has a side-effect and that could easily be considered unwanted.

Hence, I would be glad if you could come up with a fix and would appreciate screenshots of the before/after state of the explorer window for visualisation (and to satisfy my curiosity :)). Thank you.

@Legend-Master
Copy link
Contributor Author

It's hard for me to understand why it would be annoying for lack of experience

My bad, sorry didn't post screenshots for references, here you go

Current

image

Old

image

There is a setting for this behavior, the current implementation ignores this setting while the old one will not

image

@Legend-Master Legend-Master changed the title Opening a folder with shellexecute-on-windows feature expands left panel to that folder's location Opening folders with shellexecute-on-windows feature doesn't respect to 'expand to open folder' setting Nov 14, 2024
Legend-Master added a commit to Legend-Master/open-rs that referenced this issue Nov 14, 2024
To respect 'expand to open folder setting '
Fixes Byron#103
Legend-Master added a commit to Legend-Master/open-rs that referenced this issue Nov 14, 2024
To respect 'expand to open folder setting'
Fixes Byron#103
@Byron Byron closed this as completed in 7595da7 Nov 14, 2024
Byron added a commit that referenced this issue Nov 14, 2024
fix(windows): use `SHOpenFolderAndSelectItems` for folders to respect expand to open folder setting fixes #103
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants