We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef62d8e commit 30d5668Copy full SHA for 30d5668
src/vs/base/browser/ui/list/rangeMap.ts
@@ -97,13 +97,13 @@ export class RangeMap {
97
return this._paddingTop;
98
}
99
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);
+ set paddingTop(paddingTop: number) {
+ this._size = this._size + paddingTop - this._paddingTop;
+ this._paddingTop = paddingTop;
103
104
105
constructor(topPadding?: number) {
106
- this._paddingTop = topPadding || 0;
+ this._paddingTop = topPadding ?? 0;
107
this._size = this._paddingTop;
108
109
0 commit comments