We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b3a51d7 commit 151e4cbCopy full SHA for 151e4cb
1 file changed
extensions/ql-vscode/src/extension.ts
@@ -496,9 +496,11 @@ async function activateWithInstalledDistribution(
496
async function openReferencedFile(
497
selectedQuery: Uri
498
): Promise<void> {
499
- if (qs !== undefined) {
+ // If no file is selected, the path of the file in the editor is selected
500
+ const path = selectedQuery?.path || window.activeTextEditor?.document.uri.fsPath;
501
+ if (qs !== undefined && path) {
502
if (await cliServer.cliConstraints.supportsResolveQlref()) {
- const resolved = await cliServer.resolveQlref(selectedQuery.path);
503
+ const resolved = await cliServer.resolveQlref(path);
504
const uri = Uri.file(resolved.resolvedPath);
505
await window.showTextDocument(uri, { preview: false });
506
} else {
0 commit comments