File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
src/vs/workbench/services/hover/browser Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -455,6 +455,16 @@ export class HoverWidget extends Widget {
455455 maxHeight = Math . min ( maxHeight , this . _hover . containerDomNode . clientHeight ) ;
456456
457457 this . _hover . containerDomNode . style . maxHeight = `${ maxHeight } px` ;
458+ if ( this . _hover . contentsDomNode . clientHeight > maxHeight ) {
459+ this . _hover . contentsDomNode . style . height = `${ maxHeight } px` ;
460+ }
461+ if ( this . _hover . contentsDomNode . clientHeight < this . _hover . contentsDomNode . scrollHeight ) {
462+ // Add padding for a vertical scrollbar
463+ const extraRightPadding = `${ this . _hover . scrollbar . options . verticalScrollbarSize } px` ;
464+ if ( this . _hover . contentsDomNode . style . paddingRight !== extraRightPadding ) {
465+ this . _hover . contentsDomNode . style . paddingRight = extraRightPadding ;
466+ }
467+ }
458468 }
459469
460470 private setHoverPointerPosition ( target : TargetRect ) : void {
Original file line number Diff line number Diff line change 1010 /* Must be higher than sash's z-index and terminal canvases */
1111 z-index : 40 ;
1212 overflow : hidden;
13- overflow-y : auto;
1413 max-width : 700px ;
1514}
1615
You can’t perform that action at this time.
0 commit comments