Repository navigation
Preserve requested file selection when converting or reusing tabs - #144
Draft
aiolosking wants to merge 1 commit into
Draft
aiolosking wants to merge 1 commit into
aiolosking wants to merge 1 commit into
Conversation
lazyalex616
added a commit
to lazyalex616/ExplorerTabPlus
that referenced
this pull request
Oct 23, 2026
…lection when converting or reusing tabs Conflicts with w4po#137/w4po#142 in ExplorerWatcher: kept w4po#137's awaited conversion result (window is restored if conversion fails) while feeding it w4po#144's CaptureInitialSelectionAsync selection; kept w4po#137's IsFileExplorerWindow guard and bool return on tab reuse and added w4po#144's RestoreSelectionAsync there; replaced w4po#142's one-shot SelectItems after navigation with w4po#144's retrying RestoreSelectionAsync, still invoked after the NavigationCompletion wait (outside the COM callback).
notmicaelfilipe
added a commit
to notmicaelfilipe/ExplorerTabUtility
that referenced
this pull request
Nov 12, 2026
…lers and file selection From open upstream PRs (w4po/ExplorerTabUtility w4po#137, w4po#142, w4po#144), trimmed down: - New windows could stay invisible or vanish (upstream w4po#133/w4po#121): hiding and tab conversion trusted _windowEntryDict.Count, which stale COM entries inflate, so a new window got hidden and converted into itself, then quit. Decide from real Explorer windows instead, only quit the window after a tab was actually created, skip dead tabs when reusing, and unhide any window that registration never handled within 10s. - NavigateComplete2 handler leaked on the 5s timeout (a later navigation re-applied an old selection) and selection ran inside Explorer's COM event callback. Shared NavigateAndWait helper: handler only signals, always unsubscribes, selection runs after the callback returns. - Selection used display names, which drop hidden extensions, so ParseName missed "file.txt". Store full paths; names saved by older versions still work. Bump version to 2.6.4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Opening a file location can reach the correct folder but lose the requested file selection when a new Explorer window is converted to a tab. Reusing an existing tab also returns without applying the incoming selection. This draft shares a locally tested fix and its latency tradeoff for maintainer review.
Reproduction
Tested with v2.5.0 x64 .NET Framework 4.8.1 on Windows 11 Pro 25H2, build 26200.9457. Window Hook and Reuse Tabs enabled; Keyboard Hook and Mouse Hook disabled; known file extensions hidden.
sample.txt,sample.md, and a subdirectory. Keep an Explorer window open elsewhere.explorer.exe /select,"C:\path\to\test\sample.txt"(substitute your test directory).sample.mdwhile the tab already exists. The incoming selection is not restored./selectcall: selection worked in the local control test.Related report: #128. That report also describes choosing the wrong tab; this draft does not claim to fix every focus/navigation symptom in that issue.
Changes
Validation performed locally
net481Release build: zero warnings and zero errors. Local build generated COM interop references from the installed Windows type libraries because full-framework MSBuild was unavailable. Those local build changes, binaries, and SDK files are not included here./selecttests: new tab, reused tab with a different requested file, hidden extensions with identical basenames, Chinese characters/spaces in paths, and subfolder selection.SHOpenFolderAndSelectItemstests through a small native-API harness: new-tab file selection and multiple selected files in an existing tab.Why this is a draft
net9.0-windowstarget was not built locally.Prepared with AI assistance; the validation above was performed against actual local Explorer windows. Happy to split the identity/reuse fixes from the timing workaround if that is preferable.