Skip to content

Commit 33fc5a9

Browse files
authored
When typing a longer comment, the buttons scroll out of view (#239589)
* When typing a longer comment, the buttons scroll out of view Part of #239578 * Switch to opt in
1 parent 5a933c7 commit 33fc5a9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -497,9 +497,9 @@ export abstract class ZoneWidget implements IHorizontalSashLayoutProvider {
497497
// implement in subclass
498498
}
499499

500-
protected _relayout(_newHeightInLines: number): void {
500+
protected _relayout(_newHeightInLines: number, useMax?: boolean): void {
501501
const maxHeightInLines = this._getMaximumHeightInLines();
502-
const newHeightInLines = maxHeightInLines === undefined ? _newHeightInLines : Math.min(maxHeightInLines, _newHeightInLines);
502+
const newHeightInLines = (useMax && (maxHeightInLines !== undefined)) ? Math.min(maxHeightInLines, _newHeightInLines) : _newHeightInLines;
503503
if (this._viewZone && this._viewZone.heightInLines !== newHeightInLines) {
504504
this.editor.changeViewZones(accessor => {
505505
if (this._viewZone) {

Diff for: src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ class TestResultsPeek extends PeekViewWidget {
794794

795795
const displayed = this._getMaximumHeightInLines();
796796
if (displayed) {
797-
this._relayout(Math.min(displayed, this.getVisibleEditorLines() / 2));
797+
this._relayout(Math.min(displayed, this.getVisibleEditorLines() / 2), true);
798798
if (!contentHeightSettleTimer.isScheduled()) {
799799
contentHeightSettleTimer.schedule();
800800
}

0 commit comments

Comments
 (0)