diff --git a/editors/vscode/src/client.ts b/editors/vscode/src/client.ts index 7ee27277e..0a7af5a86 100644 --- a/editors/vscode/src/client.ts +++ b/editors/vscode/src/client.ts @@ -664,6 +664,15 @@ function sendGoalsRequest(position: Position, panel: WebviewPanel, docUri: Uri, let cursor = { textDocument: doc, position: position }; const req = new RequestType("proof/goals"); client.sendRequest(req, cursor).then((goals) => { + // If uri is not a lambdapi/dedukti file, do nothing + if(goals.goals == null){ + return; + } + // Take focus back if the goal panel lost it. + window.showErrorMessage("Going through Goals"); + if(!panel.active) { + panel.reveal(2, false); + } updateTerminalText(goals.logs);