mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 05:19:39 +00:00
fix a few leaking listeners (#214024)
This commit is contained in:
parent
0599ca4e7c
commit
73961d876d
|
@ -390,7 +390,7 @@ export class ReferenceWidget extends peekView.PeekViewWidget {
|
|||
this._onDidSelectReference.fire({ element, kind, source: 'tree' });
|
||||
}
|
||||
};
|
||||
this._tree.onDidOpen(e => {
|
||||
this._disposables.add(this._tree.onDidOpen(e => {
|
||||
if (e.sideBySide) {
|
||||
onEvent(e.element, 'side');
|
||||
} else if (e.editorOptions.pinned) {
|
||||
|
@ -398,7 +398,7 @@ export class ReferenceWidget extends peekView.PeekViewWidget {
|
|||
} else {
|
||||
onEvent(e.element, 'show');
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
||||
dom.hide(this._treeContainer);
|
||||
}
|
||||
|
|
|
@ -256,7 +256,7 @@ export class OpenEditorsView extends ViewPane {
|
|||
this.readonlyEditorFocusedContext = OpenEditorsReadonlyEditorContext.bindTo(this.contextKeyService);
|
||||
|
||||
this._register(this.list.onContextMenu(e => this.onListContextMenu(e)));
|
||||
this.list.onDidChangeFocus(e => {
|
||||
this._register(this.list.onDidChangeFocus(e => {
|
||||
this.resourceContext.reset();
|
||||
this.groupFocusedContext.reset();
|
||||
this.dirtyEditorFocusedContext.reset();
|
||||
|
@ -270,7 +270,7 @@ export class OpenEditorsView extends ViewPane {
|
|||
} else if (!!element) {
|
||||
this.groupFocusedContext.set(true);
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
||||
// Open when selecting via keyboard
|
||||
this._register(this.list.onMouseMiddleClick(e => {
|
||||
|
|
|
@ -523,7 +523,7 @@ export class SearchWidget extends Widget {
|
|||
}
|
||||
}));
|
||||
|
||||
this.replaceInput.onKeyDown((keyboardEvent) => this.onReplaceInputKeyDown(keyboardEvent));
|
||||
this._register(this.replaceInput.onKeyDown((keyboardEvent) => this.onReplaceInputKeyDown(keyboardEvent)));
|
||||
this.replaceInput.setValue(options.replaceValue || '');
|
||||
this._register(this.replaceInput.inputBox.onDidChange(() => this._onReplaceValueChanged.fire()));
|
||||
this._register(this.replaceInput.inputBox.onDidHeightChange(() => this._onDidHeightChange.fire()));
|
||||
|
|
Loading…
Reference in a new issue