Skip to content

Commit

Permalink
When typing a longer comment, the buttons scroll out of view (#239589)
Browse files Browse the repository at this point in the history
* When typing a longer comment, the buttons scroll out of view
Part of #239578

* Switch to opt in
  • Loading branch information
alexr00 authored Feb 4, 2025
1 parent 5a933c7 commit 33fc5a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -497,9 +497,9 @@ export abstract class ZoneWidget implements IHorizontalSashLayoutProvider {
// implement in subclass
}

protected _relayout(_newHeightInLines: number): void {
protected _relayout(_newHeightInLines: number, useMax?: boolean): void {
const maxHeightInLines = this._getMaximumHeightInLines();
const newHeightInLines = maxHeightInLines === undefined ? _newHeightInLines : Math.min(maxHeightInLines, _newHeightInLines);
const newHeightInLines = (useMax && (maxHeightInLines !== undefined)) ? Math.min(maxHeightInLines, _newHeightInLines) : _newHeightInLines;
if (this._viewZone && this._viewZone.heightInLines !== newHeightInLines) {
this.editor.changeViewZones(accessor => {
if (this._viewZone) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ class TestResultsPeek extends PeekViewWidget {

const displayed = this._getMaximumHeightInLines();
if (displayed) {
this._relayout(Math.min(displayed, this.getVisibleEditorLines() / 2));
this._relayout(Math.min(displayed, this.getVisibleEditorLines() / 2), true);
if (!contentHeightSettleTimer.isScheduled()) {
contentHeightSettleTimer.schedule();
}
Expand Down

0 comments on commit 33fc5a9

Please sign in to comment.