Skip to content

Commit 57aca20

Browse files
committed
splitview: fix resize priority in distributeEmptySpace
1 parent c64f42b commit 57aca20

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/vs/base/browser/ui/splitview/splitview.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,16 @@ export class SplitView extends Disposable {
736736
let emptyDelta = this.size - contentSize;
737737

738738
const indexes = range(this.viewItems.length - 1, -1);
739+
const lowPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === LayoutPriority.Low);
740+
const highPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === LayoutPriority.High);
741+
742+
for (const index of highPriorityIndexes) {
743+
pushToStart(indexes, index);
744+
}
745+
746+
for (const index of lowPriorityIndexes) {
747+
pushToEnd(indexes, index);
748+
}
739749

740750
if (typeof lowPriorityIndex === 'number') {
741751
pushToEnd(indexes, lowPriorityIndex);

0 commit comments

Comments
 (0)