Phase 2, plan B: editing on.
DocumentBuffer(editor orStateBuffer) holds the live state; save, disk changes and conflict choices areupdatecalls that remap folds and caret and clear text-view undo when the text is replaced.- Session: dirty state, ⌘S through
Saver, automatic or explicit save mode (Settings), conflict alert with Keep Mine / Use Disk Version (the other version goes to recovery),Saver.overwrite. - Switching files or quitting with unsaved edits saves (automatic) or asks (explicit).
- Search overlays the open file's unsaved text.
- Non-UTF-8 files stay read-only, with a subtitle.
201 tests pass.