Skip to content

Commit aa6eac5

Browse files
committed
simplifying the width, not taking into account the cursor position
1 parent 118be5c commit aa6eac5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -618,11 +618,9 @@ export class ContentHoverWidget extends ResizableContentWidget {
618618
if (!this._editor || !this._editor.hasModel()) {
619619
return;
620620
}
621-
const editorLayoutInfo = this._editor.getLayoutInfo();
622-
const glyphMarginRight = editorLayoutInfo.glyphMarginLeft + editorLayoutInfo.glyphMarginWidth;
623-
const cursorPosition = this._editor._getViewModel().getPrimaryCursorState().viewState.position;
624621
const bodyBoxWidth = dom.getClientArea(document.body).width;
625-
return bodyBoxWidth - glyphMarginRight - this._editor.getOffsetForColumn(cursorPosition.lineNumber, cursorPosition.column);
622+
const horizontalPadding = 14;
623+
return bodyBoxWidth - horizontalPadding;
626624
}
627625

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

0 commit comments

Comments
 (0)