Skip to content

Commit 30d5668

Browse files
committed
Resolve comments
1 parent ef62d8e commit 30d5668

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/vs/base/browser/ui/list/rangeMap.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,13 @@ export class RangeMap {
9797
return this._paddingTop;
9898
}
9999

100-
set paddingTop(topPadding: number) {
101-
this._paddingTop = topPadding;
102-
this._size = this._paddingTop + this.groups.reduce((t, g) => t + (g.size * (g.range.end - g.range.start)), 0);
100+
set paddingTop(paddingTop: number) {
101+
this._size = this._size + paddingTop - this._paddingTop;
102+
this._paddingTop = paddingTop;
103103
}
104104

105105
constructor(topPadding?: number) {
106-
this._paddingTop = topPadding || 0;
106+
this._paddingTop = topPadding ?? 0;
107107
this._size = this._paddingTop;
108108
}
109109

0 commit comments

Comments
 (0)