Microsoft/vscode

Untitled custom editor in web version

Open

#141.801 geöffnet am 29. Jan. 2022

Auf GitHub ansehen
 (0 Kommentare) (0 Reaktionen) (1 zugewiesene Person)TypeScript (10.221 Forks)batch import
bugcustom-editorshelp wanted

Repository-Metriken

Stars
 (74.848 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 11h 43m) (1.000 gemergte PRs in 30 T)

Beschreibung

When opening an untitled uri in the web version (at least on github.dev), the authority must be set for the untitled uri for the new untitled document to be savable (the saving code takes the authority from the untitled uri and the save dialog will error if the authority is wrong). TextDocument doesn't seem to have this issue since it gets its preferred path from the file dialog default path. CustomDocument doesn't seem to go through the same code path.

This is somewhat related to https://github.com/microsoft/vscode/issues/141561 (since both are related to generating the right untitled uri) and I believe even if no behavior change is needed, the current behavior should at least be documented. Ideally there should also be a way for the custom editor to provide a preferred saving path for untitled documents as well (also related to #141561) and also to access the file dialog default path so that it can reach feature parity with text editors.

Contributor Guide