@@ -608,7 +608,7 @@ export interface Client {
608
608
onDidChangeSettings ( event : vscode . ConfigurationChangeEvent , isFirstClient : boolean ) : { [ key : string ] : string } ;
609
609
onDidOpenTextDocument ( document : vscode . TextDocument ) : void ;
610
610
onDidCloseTextDocument ( document : vscode . TextDocument ) : void ;
611
- onDidChangeVisibleTextEditors ( editors : vscode . TextEditor [ ] ) : void ;
611
+ onDidChangeVisibleTextEditor ( editor : vscode . TextEditor ) : void ;
612
612
onDidChangeTextDocument ( textDocumentChangeEvent : vscode . TextDocumentChangeEvent ) : void ;
613
613
onRegisterCustomConfigurationProvider ( provider : CustomConfigurationProvider1 ) : Thenable < void > ;
614
614
updateCustomConfigurations ( requestingProvider ?: CustomConfigurationProvider1 ) : Thenable < void > ;
@@ -1496,15 +1496,13 @@ export class DefaultClient implements Client {
1496
1496
return changedSettings ;
1497
1497
}
1498
1498
1499
- public onDidChangeVisibleTextEditors ( editors : vscode . TextEditor [ ] ) : void {
1499
+ public onDidChangeVisibleTextEditor ( editor : vscode . TextEditor ) : void {
1500
1500
const settings : CppSettings = new CppSettings ( this . RootUri ) ;
1501
1501
if ( settings . dimInactiveRegions ) {
1502
1502
// Apply text decorations to inactive regions
1503
- for ( const e of editors ) {
1504
- const valuePair : DecorationRangesPair | undefined = this . inactiveRegionsDecorations . get ( e . document . uri . toString ( ) ) ;
1505
- if ( valuePair ) {
1506
- e . setDecorations ( valuePair . decoration , valuePair . ranges ) ; // VSCode clears the decorations when the text editor becomes invisible
1507
- }
1503
+ const valuePair : DecorationRangesPair | undefined = this . inactiveRegionsDecorations . get ( editor . document . uri . toString ( ) ) ;
1504
+ if ( valuePair ) {
1505
+ editor . setDecorations ( valuePair . decoration , valuePair . ranges ) ; // VSCode clears the decorations when the text editor becomes invisible
1508
1506
}
1509
1507
}
1510
1508
}
@@ -2997,7 +2995,7 @@ class NullClient implements Client {
2997
2995
onDidChangeSettings ( event : vscode . ConfigurationChangeEvent , isFirstClient : boolean ) : { [ key : string ] : string } { return { } ; }
2998
2996
onDidOpenTextDocument ( document : vscode . TextDocument ) : void { }
2999
2997
onDidCloseTextDocument ( document : vscode . TextDocument ) : void { }
3000
- onDidChangeVisibleTextEditors ( editors : vscode . TextEditor [ ] ) : void { }
2998
+ onDidChangeVisibleTextEditor ( editor : vscode . TextEditor ) : void { }
3001
2999
onDidChangeTextDocument ( textDocumentChangeEvent : vscode . TextDocumentChangeEvent ) : void { }
3002
3000
onRegisterCustomConfigurationProvider ( provider : CustomConfigurationProvider1 ) : Thenable < void > { return Promise . resolve ( ) ; }
3003
3001
updateCustomConfigurations ( requestingProvider ?: CustomConfigurationProvider1 ) : Thenable < void > { return Promise . resolve ( ) ; }
0 commit comments