提交 afaaee35 编写于 作者: M Matt Bierner

💄

上级 dc8557b3
......@@ -79,11 +79,13 @@ export default class FormattingConfigurationManager {
document: TextDocument,
token: CancellationToken | undefined
): Promise<void> {
for (const editor of window.visibleTextEditors) {
if (editor.document.fileName === document.fileName) {
const formattingOptions = { tabSize: editor.options.tabSize, insertSpaces: editor.options.insertSpaces } as FormattingOptions;
return this.ensureFormatOptions(document, formattingOptions, token);
}
const editor = window.visibleTextEditors.find(editor => editor.document.fileName === document.fileName);
if (editor) {
const formattingOptions = {
tabSize: editor.options.tabSize,
insertSpaces: editor.options.insertSpaces
} as FormattingOptions;
return this.ensureFormatOptions(document, formattingOptions, token);
}
}
......@@ -99,8 +101,9 @@ export default class FormattingConfigurationManager {
}
const absPath = this.client.normalizePath(document.uri);
if (!absPath) {
return Object.create(null);
return;
}
const formatOptions = this.getFormatOptions(options);
const args: Proto.ConfigureRequestArguments = {
file: absPath,
......
......@@ -110,12 +110,10 @@ export class AtaProgressReporter {
), {
title: localize('typesInstallerInitializationFailed.moreInformation', "More Information"),
id: 1
},
{
}, {
title: localize('typesInstallerInitializationFailed.doNotCheckAgain', "Don't Check Again"),
id: 2
},
{
}, {
title: localize('typesInstallerInitializationFailed.close', 'Close'),
id: 3,
isCloseAffordance: true
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册