@@ -143,22 +143,21 @@ export class StickyScrollWidget extends Disposable implements IOverlayWidget {
143
143
sessionStore . clear ( ) ;
144
144
} ) ) ;
145
145
linkGestureStore . add ( gesture . onExecute ( async e => {
146
- if ( this . _hoverOnLine !== - 1 ) {
147
- if ( e . hasTriggerModifier ) {
148
- // Control click
149
- if ( this . _candidateDefinitionsLength === 1 ) {
150
- this . _instaService . invokeFunction ( goToDefinitionWithLocation , e , this . _editor as IActiveCodeEditor , { uri : this . _editor . getModel ( ) ! . uri , range : this . _stickyRangeProjectedOnEditor } as Location ) ;
151
- } else {
152
- this . _editor . revealPosition ( { lineNumber : this . _hoverOnLine , column : 1 } ) ;
153
- this . _instaService . invokeFunction ( goToDefinitionWithLocation , e , this . _editor as IActiveCodeEditor , { uri : this . _editor . getModel ( ) ! . uri , range : this . _stickyRangeProjectedOnEditor } as Location ) ;
154
- }
146
+ if ( ( e . target as unknown as CustomMouseEvent ) . detail !== this . getId ( ) ) {
147
+ return ;
148
+ }
149
+ if ( e . hasTriggerModifier ) {
150
+ // Control click
151
+ if ( this . _candidateDefinitionsLength === 1 ) {
152
+ this . _instaService . invokeFunction ( goToDefinitionWithLocation , e , this . _editor as IActiveCodeEditor , { uri : this . _editor . getModel ( ) ! . uri , range : this . _stickyRangeProjectedOnEditor } as Location ) ;
155
153
} else {
156
- // Normal click
157
154
this . _editor . revealPosition ( { lineNumber : this . _hoverOnLine , column : 1 } ) ;
155
+ this . _instaService . invokeFunction ( goToDefinitionWithLocation , e , this . _editor as IActiveCodeEditor , { uri : this . _editor . getModel ( ) ! . uri , range : this . _stickyRangeProjectedOnEditor } as Location ) ;
158
156
}
159
- this . _hoverOnLine = - 1 ;
157
+ } else {
158
+ // Normal click
159
+ this . _editor . revealPosition ( { lineNumber : this . _hoverOnLine , column : 1 } ) ;
160
160
}
161
-
162
161
} ) ) ;
163
162
return linkGestureStore ;
164
163
}
@@ -283,10 +282,6 @@ export class StickyScrollWidget extends Disposable implements IOverlayWidget {
283
282
this . _hoverOnColumn = this . _editor . getModel ( ) . getLineContent ( line ) . indexOf ( text ) + 1 || - 1 ;
284
283
}
285
284
} ) ) ;
286
- this . _disposableStore . add ( dom . addDisposableListener ( child , 'mouseout' , ( ) => {
287
- this . _hoverOnLine = - 1 ;
288
- this . _hoverOnColumn = - 1 ;
289
- } ) ) ;
290
285
291
286
return child ;
292
287
}
0 commit comments