Pass in method directly instead of lambda for some events

This commit is contained in:
Matt Bierner
2018-07-10 14:49:54 -07:00
parent 0178fc2824
commit d68d22f961
2 changed files with 2 additions and 10 deletions

View File

@@ -120,12 +120,8 @@ export class ActiveDocumentDependentRegistration {
register: () => vscode.Disposable,
) {
this._registration = new ConditionalRegistration(register);
vscode.window.onDidChangeActiveTextEditor(this.update, this, this._disposables);
this.update();
vscode.window.onDidChangeActiveTextEditor(() => {
this.update();
}, null, this._disposables);
}
public dispose() {

View File

@@ -75,12 +75,8 @@ export class ConfigurationDependentRegistration {
register: () => vscode.Disposable,
) {
this._registration = new ConditionalRegistration(register);
this.update();
vscode.workspace.onDidChangeConfiguration(() => {
this.update();
}, null, this._disposables);
vscode.workspace.onDidChangeConfiguration(this.update, this, this._disposables);
}
public dispose() {