@@ -75,6 +75,14 @@ export class LightBulbWidget extends Disposable implements IContentWidget {
75
75
private _gutterState : LightBulbState . State = LightBulbState . Hidden ;
76
76
private _iconClasses : string [ ] = [ ] ;
77
77
78
+ private readonly lightbulbClasses = [
79
+ 'codicon-' + GUTTER_LIGHTBULB_ICON . id ,
80
+ 'codicon-' + GUTTER_LIGHTBULB_AIFIX_AUTO_FIX_ICON . id ,
81
+ 'codicon-' + GUTTER_LIGHTBULB_AUTO_FIX_ICON . id ,
82
+ 'codicon-' + GUTTER_LIGHTBULB_AIFIX_ICON . id ,
83
+ 'codicon-' + GUTTER_SPARKLE_FILLED_ICON . id
84
+ ] ;
85
+
78
86
private _preferredKbLabel ?: string ;
79
87
private _quickFixKbLabel ?: string ;
80
88
@@ -148,15 +156,8 @@ export class LightBulbWidget extends Disposable implements IContentWidget {
148
156
} ) ) ;
149
157
150
158
this . _register ( this . _editor . onMouseDown ( async ( e : IEditorMouseEvent ) => {
151
- const lightbulbClasses = [
152
- 'codicon-' + GUTTER_LIGHTBULB_ICON . id ,
153
- 'codicon-' + GUTTER_LIGHTBULB_AIFIX_AUTO_FIX_ICON . id ,
154
- 'codicon-' + GUTTER_LIGHTBULB_AUTO_FIX_ICON . id ,
155
- 'codicon-' + GUTTER_LIGHTBULB_AIFIX_ICON . id ,
156
- 'codicon-' + GUTTER_SPARKLE_FILLED_ICON . id
157
- ] ;
158
-
159
- if ( ! e . target . element || ! lightbulbClasses . some ( cls => e . target . element && e . target . element . classList . contains ( cls ) ) ) {
159
+
160
+ if ( ! e . target . element || ! this . lightbulbClasses . some ( cls => e . target . element && e . target . element . classList . contains ( cls ) ) ) {
160
161
return ;
161
162
}
162
163
@@ -247,7 +248,9 @@ export class LightBulbWidget extends Disposable implements IContentWidget {
247
248
let hasDecoration = false ;
248
249
if ( currLineDecorations ) {
249
250
for ( const decoration of currLineDecorations ) {
250
- if ( decoration . options . glyphMarginClassName ) {
251
+ const glyphClass = decoration . options . glyphMarginClassName ;
252
+
253
+ if ( glyphClass && ! this . lightbulbClasses . some ( className => glyphClass . includes ( className ) ) ) {
251
254
hasDecoration = true ;
252
255
break ;
253
256
}
0 commit comments