mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-11-27 23:19:13 +08:00
removed double suggestions when using vscode workspaces plugin
This commit is contained in:
parent
3d39107e02
commit
60599d8fc9
@ -38,11 +38,17 @@ namespace Community.PowerToys.Run.Plugin.VSCodeWorkspaces
|
||||
{
|
||||
var results = new List<Result>();
|
||||
|
||||
var alreadyAddedPaths = new List<string>();
|
||||
|
||||
if (query != null)
|
||||
{
|
||||
// Search opened workspaces
|
||||
_workspacesApi.Workspaces.ForEach(a =>
|
||||
{
|
||||
if (!alreadyAddedPaths.Contains(a.Path))
|
||||
{
|
||||
alreadyAddedPaths.Add(a.Path);
|
||||
|
||||
var title = a.WorkspaceType == WorkspaceType.ProjectFolder ? a.FolderName : a.FolderName.Replace(".code-workspace", $" ({Resources.Workspace})");
|
||||
|
||||
var typeWorkspace = a.WorkspaceEnvironmentToString();
|
||||
@ -87,6 +93,7 @@ namespace Community.PowerToys.Run.Plugin.VSCodeWorkspaces
|
||||
},
|
||||
ContextData = a,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Search opened remote machines
|
||||
|
Loading…
Reference in New Issue
Block a user