@@ -210,7 +210,7 @@ export class CodeActionModel extends Disposable {
210
210
const actions = createCancelablePromise ( async token => {
211
211
if ( this . _settingEnabledNearbyQuickfixes ( ) && trigger . trigger . type === CodeActionTriggerType . Invoke && ( trigger . trigger . triggerAction === CodeActionTriggerSource . QuickFix || trigger . trigger . filter ?. include ?. contains ( CodeActionKind . QuickFix ) ) ) {
212
212
const codeActionSet = await getCodeActions ( this . _registry , model , trigger . selection , trigger . trigger , Progress . None , token ) ;
213
-
213
+ const allCodeActions = [ ... codeActionSet . allActions ] ;
214
214
if ( token . isCancellationRequested ) {
215
215
return emptyCodeActionSet ;
216
216
}
@@ -251,6 +251,11 @@ export class CodeActionModel extends Disposable {
251
251
for ( const action of actionsAtMarker . validActions ) {
252
252
action . highlightRange = action . action . isPreferred ;
253
253
}
254
+
255
+ if ( codeActionSet . allActions . length === 0 ) {
256
+ allCodeActions . push ( ...actionsAtMarker . allActions ) ;
257
+ }
258
+
254
259
// Already filtered through to only get quickfixes, so no need to filter again.
255
260
if ( Math . abs ( currPosition . column - col ) < distance ) {
256
261
currentActions . unshift ( ...actionsAtMarker . validActions ) ;
@@ -279,7 +284,7 @@ export class CodeActionModel extends Disposable {
279
284
} ) ;
280
285
281
286
// Only retriggers if actually found quickfix on the same line as cursor
282
- return { validActions : filteredActions , allActions : codeActionSet . allActions , documentation : codeActionSet . documentation , hasAutoFix : codeActionSet . hasAutoFix , dispose : ( ) => { codeActionSet . dispose ( ) ; } } ;
287
+ return { validActions : filteredActions , allActions : allCodeActions , documentation : codeActionSet . documentation , hasAutoFix : codeActionSet . hasAutoFix , dispose : ( ) => { codeActionSet . dispose ( ) ; } } ;
283
288
}
284
289
}
285
290
}
0 commit comments