File tree Expand file tree Collapse file tree
src/vs/workbench/contrib/terminal/browser Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -88,6 +88,9 @@ export class TerminalLinkHandler {
8888 this . _gitDiffPostImagePattern = / ^ \+ \+ \+ b \/ ( \S * ) / ;
8989
9090 this . _tooltipCallback = ( e : MouseEvent ) => {
91+ if ( ! this . _widgetManager ) {
92+ return ;
93+ }
9194 if ( this . _terminalService && this . _terminalService . configHelper . config . rendererType === 'dom' ) {
9295 const target = ( e . target as HTMLElement ) ;
9396 this . _widgetManager . showMessage ( target . offsetLeft , target . offsetTop , this . _getLinkHoverString ( ) ) ;
@@ -115,7 +118,11 @@ export class TerminalLinkHandler {
115118 const options : ILinkMatcherOptions = {
116119 matchIndex,
117120 tooltipCallback : this . _tooltipCallback ,
118- leaveCallback : ( ) => this . _widgetManager . closeMessage ( ) ,
121+ leaveCallback : ( ) => {
122+ if ( this . _widgetManager ) {
123+ this . _widgetManager . closeMessage ( ) ;
124+ }
125+ } ,
119126 willLinkActivate : ( e : MouseEvent ) => this . _isLinkActivationModifierDown ( e ) ,
120127 priority : CUSTOM_LINK_PRIORITY
121128 } ;
You can’t perform that action at this time.
0 commit comments