Skip to content

Commit 4784b1f

Browse files
committed
Change bottomLeft to be under the last anchor line
1 parent 1bcb42f commit 4784b1f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ class Widget {
300300
const heightAboveLine = aboveLineTop;
301301

302302
// b) the box under the line
303-
const underLineTop = bottomLeft.top + this._lineHeight;
303+
const underLineTop = bottomLeft.top;
304304
const heightUnderLine = ctx.viewportHeight - underLineTop;
305305

306306
const aboveTop = aboveLineTop - height;
@@ -359,7 +359,7 @@ class Widget {
359359

360360
private _layoutBoxInPage(topLeft: Coordinate, bottomLeft: Coordinate, width: number, height: number, ctx: RenderingContext): IBoxLayoutResult | null {
361361
const aboveTop = topLeft.top - height;
362-
const belowTop = bottomLeft.top + this._lineHeight;
362+
const belowTop = bottomLeft.top;
363363

364364
const domNodePosition = dom.getDomNodePagePosition(this._viewDomNode.domNode);
365365
const absoluteAboveTop = domNodePosition.top + aboveTop - window.scrollY;
@@ -449,7 +449,7 @@ class Widget {
449449
const topLeft = new Coordinate(topForPosition, firstLineMinLeft);
450450

451451
const topForBottomLine = ctx.getVerticalOffsetForLineNumber(lastLine.lineNumber) - ctx.scrollTop;
452-
const bottomLeft = new Coordinate(topForBottomLine, lastLineMinLeft);
452+
const bottomLeft = new Coordinate(topForBottomLine + this._lineHeight, lastLineMinLeft);
453453

454454
return [topLeft, bottomLeft];
455455
}

0 commit comments

Comments
 (0)