Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into aqua-kite
Browse files Browse the repository at this point in the history
  • Loading branch information
gjsjohnmurray committed Jul 26, 2024
2 parents 19972ff + 5e68695 commit 4d3798d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
if (vscode.workspace.workspaceFolders && vscode.workspace.workspaceFolders.length > 1) {
const workspaceFolder = currentWorkspaceFolder();
if (workspaceFolder && workspaceFolder !== workspaceState.get<string>("workspaceFolder")) {
workspaceState.update("workspaceFolder", workspaceFolder);
await workspaceState.update("workspaceFolder", workspaceFolder);
await checkConnection(false, editor?.document.uri);
}
}
Expand Down Expand Up @@ -1323,15 +1323,20 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
}),
vscode.window.onDidChangeActiveTextEditor(async (textEditor: vscode.TextEditor) => {
if (!textEditor) return;
await checkConnection(false, textEditor.document.uri);
posPanel.text = "";
await checkConnection(false, textEditor.document.uri);
if (textEditor.document.uri.path.toLowerCase().endsWith(".xml") && config("autoPreviewXML")) {
return previewXMLAsUDL(textEditor, true);
}
}),
vscode.window.onDidChangeTextEditorSelection((event: vscode.TextEditorSelectionChangeEvent) => {
posPanel.text = "";
const document = event.textEditor.document;

// Avoid losing position indicator if event came from output channel
if (document.uri.scheme == "output") {
return;
}
posPanel.text = "";
if (![macLangId, intLangId].includes(document.languageId)) {
return;
}
Expand Down

0 comments on commit 4d3798d

Please sign in to comment.