We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f23ffc9 commit 1b2d498Copy full SHA for 1b2d498
src/client/pythonEnvironments/legacyIOC.ts
@@ -301,7 +301,14 @@ class ComponentAdapter implements IComponentAdapter {
301
let wsFolder: vscode.WorkspaceFolder | undefined;
302
if (resource !== undefined) {
303
wsFolder = vscode.workspace.getWorkspaceFolder(resource);
304
- } else if (vscode.workspace.workspaceFolders && vscode.workspace.workspaceFolders.length > 0) {
+ }
305
+ // Untitled files should still use the workspace as the query location
306
+ if (
307
+ !wsFolder &&
308
+ vscode.workspace.workspaceFolders &&
309
+ vscode.workspace.workspaceFolders.length > 0 &&
310
+ (!resource || resource.scheme === 'untitled')
311
+ ) {
312
[wsFolder] = vscode.workspace.workspaceFolders;
313
}
314
0 commit comments