File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -1013,15 +1013,12 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
1013
1013
)
1014
1014
) ,
1015
1015
vscode . window . onDidChangeActiveTextEditor ( ( editor : vscode . TextEditor ) => {
1016
- const uri : string = editor . document . uri . toString ( ) ;
1017
- if (
1018
- config ( "openClassContracted" ) &&
1019
- editor &&
1020
- editor . document . languageId === "objectscript-class" &&
1021
- ! openedClasses . includes ( uri )
1022
- ) {
1023
- vscode . commands . executeCommand ( "editor.foldLevel1" ) ;
1024
- openedClasses . push ( uri ) ;
1016
+ if ( config ( "openClassContracted" ) && editor && editor . document . languageId === "objectscript-class" ) {
1017
+ const uri : string = editor . document . uri . toString ( ) ;
1018
+ if ( ! openedClasses . includes ( uri ) ) {
1019
+ vscode . commands . executeCommand ( "editor.foldLevel1" ) ;
1020
+ openedClasses . push ( uri ) ;
1021
+ }
1025
1022
}
1026
1023
} ) ,
1027
1024
vscode . workspace . onDidCloseTextDocument ( ( doc : vscode . TextDocument ) => {
You can’t perform that action at this time.
0 commit comments