File tree 1 file changed +9
-9
lines changed
1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -157,22 +157,22 @@ export class Commands {
157
157
const output : {
158
158
workspaces : { folderUri : vscode . Uri ; remoteAuthority : string } [ ]
159
159
} = await vscode . commands . executeCommand ( "_workbench.getRecentlyOpened" )
160
- const opened = output . workspaces . filter ( ( opened ) => opened . folderUri ?. authority === uri . authority )
160
+ const opened = output . workspaces . filter (
161
+ // Filter out `/` since that's added below.
162
+ ( opened ) => opened . folderUri ?. authority === uri . authority && uri . path !== "/" ,
163
+ )
161
164
// Always add `/` as an option to open. If we don't, it can become hard
162
165
// to open multiple VS Code windows.
163
166
opened . splice ( 0 , 0 , {
164
167
folderUri : uri ,
165
168
remoteAuthority : "coder" ,
166
169
} )
167
170
if ( opened . length > 1 ) {
168
- const items : vscode . QuickPickItem [ ] = opened
169
- // Filter out `/` since that's added above.
170
- . filter ( ( folder ) => folder . folderUri . path !== "/" )
171
- . map ( ( folder ) : vscode . QuickPickItem => {
172
- return {
173
- label : folder . folderUri . fsPath ,
174
- }
175
- } )
171
+ const items : vscode . QuickPickItem [ ] = opened . map ( ( folder ) : vscode . QuickPickItem => {
172
+ return {
173
+ label : folder . folderUri . fsPath ,
174
+ }
175
+ } )
176
176
const item = await vscode . window . showQuickPick ( items , {
177
177
title : "Select a recently opened folder" ,
178
178
} )
You can’t perform that action at this time.
0 commit comments