修正Windows下copy-path和open-terminal两个系统命令对文件资源管理器的判断异常#517
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces window class name (className) matching for window commands, specifically adding support for Windows Explorer (CabinetWClass) and Finder ("") to "Copy Path" and "Open in Terminal" commands. It also prevents window state switching when the Windows taskbar (Shell_TrayWnd) is focused. The review feedback points out a bug on macOS where windowInfo.className is undefined, causing the Finder.app match to fail against the empty string "" in plugin.json. A suggestion is provided to normalize windowInfo.className to an empty string during comparison.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
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.
增加了对windows下文件资源管理器的类名判断,只有在类名为"CabinetWClass"时,才会显示copy-path和open-terminal命令。类似于下图中的界面成为前台窗口时,才显示这两个命令。

目前2.5.0版本,在点击系统托盘后,任务栏会成为前台窗口,此时以无法获取到打开的文件资源管理器中的路径。
同时还阻止了任务栏会成为前台窗口时,不再触发窗口激活事件,以此作为第二重保障