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> {
865865 if ( vscode . workspace . workspaceFolders && vscode . workspace . workspaceFolders . length > 1 ) {
866866 const workspaceFolder = currentWorkspaceFolder ( ) ;
867867 if ( workspaceFolder && workspaceFolder !== workspaceState . get < string > ( "workspaceFolder" ) ) {
868- workspaceState . update ( "workspaceFolder" , workspaceFolder ) ;
868+ await workspaceState . update ( "workspaceFolder" , workspaceFolder ) ;
869869 await checkConnection ( false , editor ?. document . uri ) ;
870870 }
871871 }
@@ -1318,15 +1318,20 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
13181318 } ) ,
13191319 vscode . window . onDidChangeActiveTextEditor ( async ( textEditor : vscode . TextEditor ) => {
13201320 if ( ! textEditor ) return ;
1321- await checkConnection ( false , textEditor . document . uri ) ;
13221321 posPanel . text = "" ;
1322+ await checkConnection ( false , textEditor . document . uri ) ;
13231323 if ( textEditor . document . uri . path . toLowerCase ( ) . endsWith ( ".xml" ) && config ( "autoPreviewXML" ) ) {
13241324 return previewXMLAsUDL ( textEditor , true ) ;
13251325 }
13261326 } ) ,
13271327 vscode . window . onDidChangeTextEditorSelection ( ( event : vscode . TextEditorSelectionChangeEvent ) => {
1328- posPanel . text = "" ;
13291328 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 = "" ;
13301335 if ( ! [ macLangId , intLangId ] . includes ( document . languageId ) ) {
13311336 return ;
13321337 }
You can’t perform that action at this time.
0 commit comments