@@ -34,6 +34,8 @@ import { dispose, IDisposable } from 'vs/base/common/lifecycle';
3434import { EditOperation } from 'vs/editor/common/core/editOperation' ;
3535import { basename } from 'vs/base/common/path' ;
3636import { domEvent } from 'vs/base/browser/event' ;
37+ import { ModesHoverController } from 'vs/editor/contrib/hover/hover' ;
38+ import { HoverStartMode } from 'vs/editor/contrib/hover/hoverOperation' ;
3739
3840const HOVER_DELAY = 300 ;
3941const LAUNCH_JSON_REGEX = / \. v s c o d e \/ l a u n c h \. j s o n $ / ;
@@ -252,14 +254,24 @@ export class DebugEditorContribution implements IDebugEditorContribution {
252254 const standardKeyboardEvent = new StandardKeyboardEvent ( keydownEvent ) ;
253255 if ( standardKeyboardEvent . keyCode === KeyCode . Alt ) {
254256 this . altPressed = true ;
257+ const debugHoverWasVisible = this . hoverWidget . isVisible ( ) ;
255258 this . hoverWidget . hide ( ) ;
256259 this . enableEditorHover ( ) ;
260+ if ( debugHoverWasVisible && this . hoverRange ) {
261+ // If the debug hover was visible immediately show the editor hover for the alt transition to be smooth
262+ const hoverController = this . editor . getContribution < ModesHoverController > ( ModesHoverController . ID ) ;
263+ hoverController . showContentHover ( this . hoverRange , HoverStartMode . Immediate , false ) ;
264+ }
265+
257266 const listener = domEvent ( document , 'keyup' ) ( keyupEvent => {
258267 const standardKeyboardEvent = new StandardKeyboardEvent ( keyupEvent ) ;
259268 if ( standardKeyboardEvent . keyCode === KeyCode . Alt ) {
260269 this . altPressed = false ;
261270 this . editor . updateOptions ( { hover : { enabled : false } } ) ;
262271 listener . dispose ( ) ;
272+ if ( this . hoverRange && debugHoverWasVisible ) {
273+ this . showHover ( this . hoverRange , false ) ;
274+ }
263275 }
264276 } ) ;
265277 }
0 commit comments