提交 5290baab 编写于 作者: J Johannes Rieken

improve message when files is too large for formatting, fixes...

improve message when files is too large for formatting, fixes https://github.com/microsoft/vscode/issues/105986
上级 8cebd107
......@@ -55,6 +55,8 @@ registerEditorAction(class FormatDocumentMultipleAction extends EditorAction {
return commandService.executeCommand('editor.action.formatDocument.multiple');
} else if (formatterCount === 1) {
return commandService.executeCommand('editor.action.formatDocument');
} else if (model.isTooLargeForSyncing()) {
notificationService.prompt(Severity.Info, nls.localize('too.large', "This file cannot be formatted because it is too large"), []);
} else {
const langName = model.getLanguageIdentifier().language;
const message = nls.localize('no.provider', "There is no formatter for '{0}' files installed.", langName);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册