File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/vs/editor/contrib/codeAction/browser Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -308,7 +308,10 @@ export class CodeActionController extends Disposable implements IEditorContribut
308308 const diagnostics = action . action . diagnostics ;
309309 currentDecorations . clear ( ) ;
310310 if ( ranges && ranges . length > 0 ) {
311- const decorations : IModelDeltaDecoration [ ] = ranges . map ( range => ( { range, options : CodeActionController . DECORATION } ) ) ;
311+ // Handles case for `fix all` where there are multiple diagnostics.
312+ const decorations : IModelDeltaDecoration [ ] = ( diagnostics && diagnostics ?. length > 1 )
313+ ? diagnostics . map ( diagnostic => ( { range : diagnostic , options : CodeActionController . DECORATION } ) )
314+ : ranges . map ( range => ( { range, options : CodeActionController . DECORATION } ) ) ;
312315 currentDecorations . set ( decorations ) ;
313316 } else if ( diagnostics && diagnostics . length > 0 ) {
314317 const decorations : IModelDeltaDecoration [ ] = diagnostics . map ( diagnostic => ( { range : diagnostic , options : CodeActionController . DECORATION } ) ) ;
You can’t perform that action at this time.
0 commit comments