Skip to content

Commit a8366d1

Browse files
authored
inline code actions fix (microsoft#257909)
1 parent 103394e commit a8366d1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/vs/editor/contrib/codeAction/browser/codeActionModel.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,12 @@ export class CodeActionModel extends Disposable {
239239
return emptyCodeActionSet;
240240
}
241241

242-
// Search for quickfixes in the curret code action set.
243-
const foundQuickfix = codeActionSet.validActions?.some(action => action.action.kind ? CodeActionKind.QuickFix.contains(new HierarchicalKind(action.action.kind)) : false);
242+
// Search for non-AI quickfixes in the current code action set - if AI code actions are the only thing found, continue searching for diagnostics in line.
243+
const foundQuickfix = codeActionSet.validActions?.some(action => {
244+
return action.action.kind &&
245+
CodeActionKind.QuickFix.contains(new HierarchicalKind(action.action.kind)) &&
246+
!action.action.isAI;
247+
});
244248
const allMarkers = this._markerService.read({ resource: model.uri });
245249
if (foundQuickfix) {
246250
for (const action of codeActionSet.validActions) {

0 commit comments

Comments
 (0)