Skip to content

Commit c96df9d

Browse files
authored
fix: memory leak in pattern input widget (microsoft#258152)
1 parent 18948aa commit c96df9d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vs/workbench/contrib/search/browser/patternInputWidget.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export class PatternInputWidget extends Widget {
142142
this.domNode.classList.add('monaco-findInput');
143143
const history = options.history || [];
144144

145-
this.inputBox = new ContextScopedHistoryInputBox(this.domNode, this.contextViewProvider, {
145+
this.inputBox = this._register(new ContextScopedHistoryInputBox(this.domNode, this.contextViewProvider, {
146146
placeholder: options.placeholder,
147147
showPlaceholderOnFocus: options.showPlaceholderOnFocus,
148148
tooltip: options.tooltip,
@@ -153,7 +153,7 @@ export class PatternInputWidget extends Widget {
153153
history: new Set(history),
154154
showHistoryHint: () => showHistoryKeybindingHint(this.keybindingService),
155155
inputBoxStyles: options.inputBoxStyles
156-
}, this.contextKeyService);
156+
}, this.contextKeyService));
157157
this._register(this.inputBox.onDidChange(() => this._onSubmit.fire(true)));
158158

159159
this.inputFocusTracker = dom.trackFocus(this.inputBox.inputElement);

0 commit comments

Comments
 (0)