mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 10:08:49 +01:00
Pass in method directly instead of lambda for some events
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user