diff --git a/package.json b/package.json index 0c86b5a..40a28c5 100755 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "vscode-office", "displayName": "Office Viewer(Markdown Editor)", "description": "View word,excel files and using WYSIWYG editor for markdown.", - "version": "3.3.8", + "version": "3.3.9", "publisher": "cweijan", "icon": "images/icon.png", "engines": { diff --git a/src/provider/markdownEditorProvider.ts b/src/provider/markdownEditorProvider.ts index c1c7754..b9868fd 100644 --- a/src/provider/markdownEditorProvider.ts +++ b/src/provider/markdownEditorProvider.ts @@ -113,9 +113,9 @@ export class MarkdownEditorProvider implements vscode.CustomTextEditorProvider { this.updateCount(content) }).on("doSave", async (content) => { lastManualSaveTime = Date.now(); - vscode.commands.executeCommand('workbench.action.files.save'); - this.updateTextDocument(document, content) + await this.updateTextDocument(document, content) this.updateCount(content) + vscode.commands.executeCommand('workbench.action.files.save'); }).on("export", (option) => { vscode.commands.executeCommand('workbench.action.files.save'); new MarkdownService(this.context).exportMarkdown(uri, option)