Skip to content

Can Open Instead activate the specified tag when the tag are the same? #345

@vvyoko

Description

@vvyoko

First of all, I wish you a happy life
This article is converted through Google Translate, I hope you can understand

Currently it tries to create a new tag every time
Windows in such a function
https://learn.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shopenfolderandselectitems
It is different from explorer /select, the command is that it will try to find the folder path first,
If there is a tab (window) for the specified folder path
and then navigate to the file

As mentioned above, the only extra step is to find out whether there is a tab(window),
if there is no new and select, or activation and select

Open Instead can achieve this function
I simply replaced SBSP_NEWBROWSER in o.Data.wFlags with SBSP_SAMEBROWSER

I know that I should get the list of tabs for tab plus first
Then traverse whether the path of the tab is the folder of the incoming parameter
According to the situation, decide whether the wFlags parameter is SBSP_NEWBROWSER or SBSP_SAMEBROWSER
But I am really not familiar with the related functions of TE, I hope it can help...

By the way, hope not to change the ViewMode in Te etc.
That is to modify the whole part of CurrentViewMode
I can't predict what the status in Explorer will be like at this time
Disturbing TE's status for this is very unreasonable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions