Skip to content

Untitled quarto file fails to switch to visual mode when a save is prompted by PositronΒ #827

@falbukrek

Description

@falbukrek

Bug description

System details:

Positron and OS details:

Positron Version: 2025.09.0 build 139
Code - OSS Version: 1.103.0
Commit: 30e3d0a74e09a0f6640929822cb57a326671360e
Date: 2025-08-29T18:31:36.739Z
Electron: 37.2.3
Chromium: 138.0.7204.100
Node.js: 22.17.0
V8: 13.8.500258-electron.0
OS: Darwin arm64 24.6.0

Session details:

Python 3.9.6

Describe the issue:

Positron attempts to save a new quarto document before switching to visual mode, but the document's name stays untitled.

Steps to reproduce the issue:

  1. Open Positron
  2. New > New File
  3. Select Quarto Document
  4. You now have an Untitled quarto document open in the editor.
  5. Click the edit mode toggle to "Visual"
  6. Positron presents a modal: "Do you want to save changes you made to Untitled-1? Your changes will be lost if you don't save them."
  7. Click Save
  8. Type in a name for the file to be saved. E.g.: hello.qmd.
  9. The name of the file on the editor tab does not change. Editor is now in Visual model, but shows "Untitled Document [Return to Source Mode] Untitled documents cannot be edited in visual mode. Please switch back to source mode, save the document, then re-open in the visual editor."
  10. Inspect the file system to find that the file was actually saved correctly, but Positron doesn't see it.

Expected or desired behavior:

When a file save is triggered by Positron in order to switch to Visual mode for a quarto file, the editor should update the file's name on its tab with the new name. It should not claim it is untitled, and it should allow visual editing.

Were there any error messages in the UI, Output panel, or Developer Tools console?

Image

Note: This issue was originally reported at posit-dev/positron#9501 and reproduced. I was asked to transfer it here, because the code implicated resides in the VS Code extension.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingvscode

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions