Skip to content

Commit 7358270

Browse files
authored
Merge pull request microsoft#186469 from microsoft/aiday/issue186334
Changing the maximum width of hover
2 parents eded89b + aa6eac5 commit 7358270

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/vs/editor/contrib/hover/browser/contentHover.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -618,10 +618,9 @@ export class ContentHoverWidget extends ResizableContentWidget {
618618
if (!this._editor || !this._editor.hasModel()) {
619619
return;
620620
}
621-
const editorBox = dom.getDomNodePagePosition(this._editor.getDomNode());
622-
const glyphMarginWidth = this._editor.getLayoutInfo().glyphMarginWidth;
623-
const leftOfContainer = this._hover.containerDomNode.offsetLeft;
624-
return editorBox.width + editorBox.left - leftOfContainer - glyphMarginWidth;
621+
const bodyBoxWidth = dom.getClientArea(document.body).width;
622+
const horizontalPadding = 14;
623+
return bodyBoxWidth - horizontalPadding;
625624
}
626625

627626
public isMouseGettingCloser(posx: number, posy: number): boolean {

0 commit comments

Comments
 (0)