Skip to content

Commit 0007f99

Browse files
authored
SCM - fix input widget regression (microsoft#182477)
1 parent bb7b5f1 commit 0007f99

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/vs/workbench/contrib/scm/browser/scmViewPane.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ class InputRenderer implements ICompressibleTreeRenderer<ISCMInput, FuzzyScore,
202202
const inputWidget = this.instantiationService.createInstance(SCMInputWidget, inputElement, this.overflowWidgetsDomNode);
203203
templateDisposable.add(inputWidget);
204204

205-
return { inputWidget, elementDisposables: templateDisposable.add(new DisposableStore()), templateDisposable };
205+
return { inputWidget, elementDisposables: new DisposableStore(), templateDisposable };
206206
}
207207

208208
renderElement(node: ITreeNode<ISCMInput, FuzzyScore>, index: number, templateData: InputTemplate): void {
@@ -211,7 +211,12 @@ class InputRenderer implements ICompressibleTreeRenderer<ISCMInput, FuzzyScore,
211211

212212
// Remember widget
213213
this.inputWidgets.set(input, templateData.inputWidget);
214-
templateData.elementDisposables.add({ dispose: () => this.inputWidgets.delete(input) });
214+
templateData.elementDisposables.add({
215+
dispose: () => {
216+
this.inputWidgets.delete(input);
217+
this.contentHeights.delete(input);
218+
}
219+
});
215220

216221
// Widget cursor selections
217222
const selections = this.editorSelections.get(input);

0 commit comments

Comments
 (0)