Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/vscode/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## 1.126.0 (Unreleased)

- Fixed a bug opening non-Quarto files in visual mode on saving (<https://github.com/quarto-dev/quarto/pull/848>).

## 1.125.0 (Release on 2025-09-03)

- Fixed an issue where attribute values containing '='s could be truncated in some scenarios (<https://github.com/quarto-dev/quarto/pull/814>).
Expand Down
22 changes: 11 additions & 11 deletions apps/vscode/src/providers/editor/toggle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,18 +129,18 @@ export async function reopenEditorInVisualMode(
// reopen in visual mode
commands.executeCommand('positron.reopenWith', document.uri, 'quarto.visualEditor');
} else {
workspace.onDidSaveTextDocument(async (doc: TextDocument) => {
// open in visual mode
VisualEditorProvider.recordPendingSwitchToVisual(doc);
await commands.executeCommand('workbench.action.closeActiveEditor');
await commands.executeCommand("vscode.openWith",
doc.uri,
VisualEditorProvider.viewType,
{ viewColumn }
);
});
// save, which will trigger `onDidSaveTextDocument`
// save then close
await commands.executeCommand("workbench.action.files.save");
await commands.executeCommand('workbench.action.closeActiveEditor');
VisualEditorProvider.recordPendingSwitchToVisual(document);

// open in visual mode
await commands.executeCommand(
"vscode.openWith",
document.uri,
VisualEditorProvider.viewType,
{ viewColumn }
);
}
}

Expand Down