File tree Expand file tree Collapse file tree
src/vs/editor/contrib/codeAction Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,6 +73,9 @@ class ManagedCodeActionSet extends Disposable implements CodeActionSet {
7373 }
7474}
7575
76+
77+ const emptyCodeActionsResponse = { actions : [ ] as modes . CodeAction [ ] , documentation : undefined } ;
78+
7679export function getCodeActions (
7780 model : ITextModel ,
7881 rangeOrSelection : Range | Selection ,
@@ -100,7 +103,7 @@ export function getCodeActions(
100103 }
101104
102105 if ( cts . token . isCancellationRequested ) {
103- return { actions : [ ] as modes . CodeAction [ ] , documentation : undefined } ;
106+ return emptyCodeActionsResponse ;
104107 }
105108
106109 const filteredActions = ( providedCodeActions ?. actions || [ ] ) . filter ( action => action && filtersAction ( filter , action ) ) ;
@@ -111,7 +114,7 @@ export function getCodeActions(
111114 throw err ;
112115 }
113116 onUnexpectedExternalError ( err ) ;
114- return { actions : [ ] as modes . CodeAction [ ] , documentation : undefined } ;
117+ return emptyCodeActionsResponse ;
115118 }
116119 } ) ;
117120
You can’t perform that action at this time.
0 commit comments