diff --git a/src/extension-common.ts b/src/extension-common.ts index 40fe648..580afea 100644 --- a/src/extension-common.ts +++ b/src/extension-common.ts @@ -557,7 +557,7 @@ export async function initExtensionCommon(context: vscode.ExtensionContext) { if (fileExists) { const previewMode = getPreviewMode(); - const document = await vscode.workspace.openTextDocument(fileUri); + const document = await vscode.workspace.openTextDocument(vscode.Uri.parse(openFilePath.split('#').slice(0, -1).join('#')||openFilePath)); // Open custom editor if ( previewMode === PreviewMode.PreviewsOnly &&