File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -865,7 +865,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
865
865
if ( vscode . workspace . workspaceFolders && vscode . workspace . workspaceFolders . length > 1 ) {
866
866
const workspaceFolder = currentWorkspaceFolder ( ) ;
867
867
if ( workspaceFolder && workspaceFolder !== workspaceState . get < string > ( "workspaceFolder" ) ) {
868
- workspaceState . update ( "workspaceFolder" , workspaceFolder ) ;
868
+ await workspaceState . update ( "workspaceFolder" , workspaceFolder ) ;
869
869
await checkConnection ( false , editor ?. document . uri ) ;
870
870
}
871
871
}
@@ -1318,15 +1318,20 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
1318
1318
} ) ,
1319
1319
vscode . window . onDidChangeActiveTextEditor ( async ( textEditor : vscode . TextEditor ) => {
1320
1320
if ( ! textEditor ) return ;
1321
- await checkConnection ( false , textEditor . document . uri ) ;
1322
1321
posPanel . text = "" ;
1322
+ await checkConnection ( false , textEditor . document . uri ) ;
1323
1323
if ( textEditor . document . uri . path . toLowerCase ( ) . endsWith ( ".xml" ) && config ( "autoPreviewXML" ) ) {
1324
1324
return previewXMLAsUDL ( textEditor , true ) ;
1325
1325
}
1326
1326
} ) ,
1327
1327
vscode . window . onDidChangeTextEditorSelection ( ( event : vscode . TextEditorSelectionChangeEvent ) => {
1328
- posPanel . text = "" ;
1329
1328
const document = event . textEditor . document ;
1329
+
1330
+ // Avoid losing position indicator if event came from output channel
1331
+ if ( document . uri . scheme == "output" ) {
1332
+ return ;
1333
+ }
1334
+ posPanel . text = "" ;
1330
1335
if ( ! [ macLangId , intLangId ] . includes ( document . languageId ) ) {
1331
1336
return ;
1332
1337
}
You can’t perform that action at this time.
0 commit comments