Merge from vscode 2cd495805cf99b31b6926f08ff4348124b2cf73d

This commit is contained in:
ADS Merger
2020-06-30 04:40:21 +00:00
committed by AzureDataStudio
parent a8a7559229
commit 1388493cc1
602 changed files with 16375 additions and 12940 deletions

View File

@@ -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;
}
});