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
}
@@ -1323,15 +1323,20 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
1323
1323
} ) ,
1324
1324
vscode . window . onDidChangeActiveTextEditor ( async ( textEditor : vscode . TextEditor ) => {
1325
1325
if ( ! textEditor ) return ;
1326
- await checkConnection ( false , textEditor . document . uri ) ;
1327
1326
posPanel . text = "" ;
1327
+ await checkConnection ( false , textEditor . document . uri ) ;
1328
1328
if ( textEditor . document . uri . path . toLowerCase ( ) . endsWith ( ".xml" ) && config ( "autoPreviewXML" ) ) {
1329
1329
return previewXMLAsUDL ( textEditor , true ) ;
1330
1330
}
1331
1331
} ) ,
1332
1332
vscode . window . onDidChangeTextEditorSelection ( ( event : vscode . TextEditorSelectionChangeEvent ) => {
1333
- posPanel . text = "" ;
1334
1333
const document = event . textEditor . document ;
1334
+
1335
+ // Avoid losing position indicator if event came from output channel
1336
+ if ( document . uri . scheme == "output" ) {
1337
+ return ;
1338
+ }
1339
+ posPanel . text = "" ;
1335
1340
if ( ! [ macLangId , intLangId ] . includes ( document . languageId ) ) {
1336
1341
return ;
1337
1342
}
You can’t perform that action at this time.
0 commit comments