feat(todo): edit the file right in the TODO preview (#1129)

The TODO preview is an editor on the file, as in IntelliJ: a CodeMirror view attached to the real document, so edits share the buffer with editor tabs and Save All saves them; no editing switch. The caret lands on the selected item, also when another item of the same file is selected. Read-only files fall back to the read-only preview. Dirty buffers are held rather than released (releasing would auto-save or drop the edits), and previewText reads the held text.

Co-authored-by: qtvbwfn <[email protected]>
Цей коміт міститься в:
Qingтаqtvbwfn authored and GitHub committed 2026-11-04 08:58:53 +08:00
1 джерело 893cbede9c
коміт 2f2d3a25ae
8 files changed
+340 -3

No files matched your search

+1
Переглянути файл
@@ -85,6 +85,7 @@ export async function attachDocument(manager: DocumentManager, path: string): Pr
path,
doc: model.doc,
text: () => model.sync.localText.toString(),
uiMode: () => model.getMeta().uiMode,
readOnly: model.getMeta().readOnly || model.virtual,
extension: [
model.manager.workspaceHistory.extension(historyTarget),