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 5a38f21 commit d44ffc2Copy full SHA for d44ffc2
1 file changed
extension/util.js
@@ -75,6 +75,12 @@ const getWorkspace = (context) => {
75
const relative = path.relative(wsFolder.uri.fsPath, vscode.window.activeTextEditor.document.uri.path)
76
return relative && !relative.startsWith('..') && !path.isAbsolute(relative)
77
})
78
+
79
+ // The file that is active does not belong to any of the workspace folders, so let's use the first workspace
80
+ if (!root) {
81
+ root = vscode.workspace.workspaceFolders[0]
82
+ }
83
84
workspace = root && root.uri ? root.uri.fsPath : null
85
} else {
86
// No file was open, so just grab the first available workspace
0 commit comments