mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-12 02:58:31 -05:00
Merge from vscode 2cd495805cf99b31b6926f08ff4348124b2cf73d
This commit is contained in:
committed by
AzureDataStudio
parent
a8a7559229
commit
1388493cc1
@@ -73,6 +73,9 @@ class ManagedCodeActionSet extends Disposable implements CodeActionSet {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const emptyCodeActionsResponse = { actions: [] as modes.CodeAction[], documentation: undefined };
|
||||
|
||||
export function getCodeActions(
|
||||
model: ITextModel,
|
||||
rangeOrSelection: Range | Selection,
|
||||
@@ -100,7 +103,7 @@ export function getCodeActions(
|
||||
}
|
||||
|
||||
if (cts.token.isCancellationRequested) {
|
||||
return { actions: [] as modes.CodeAction[], documentation: undefined };
|
||||
return emptyCodeActionsResponse;
|
||||
}
|
||||
|
||||
const filteredActions = (providedCodeActions?.actions || []).filter(action => action && filtersAction(filter, action));
|
||||
@@ -111,7 +114,7 @@ export function getCodeActions(
|
||||
throw err;
|
||||
}
|
||||
onUnexpectedExternalError(err);
|
||||
return { actions: [] as modes.CodeAction[], documentation: undefined };
|
||||
return emptyCodeActionsResponse;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user