feat: reload clean buffers and guard external-change writes

This commit is contained in:
2026-10-12 22:27:08 +02:00
parent bb5c247ab2
commit 298d586c3e
7 changed files with 556 additions and 41 deletions
+11 -3
View File
@@ -40,11 +40,19 @@ Insert: Ctrl+n requests LSP completion at primary caret, then cycles next; Ctrl+
Outside snippets Enter inserts newline, Tab inserts tab; Esc keeps text and returns to Normal
Insert/Command/Search: Ctrl+u deletes backward to the logical line start
Search: Enter finds next literal match, Esc cancels (case-sensitive, wraps)
Commands: :save [PATH], :quit, :force_quit, :save_and_quit [PATH], :plugins, :PLUGIN [ARGS]
Aliases: w=save, q=quit, q!=force_quit, wq=save_and_quit
Commands: :save [PATH], :force_save [PATH], :quit, :force_quit,
:save_and_quit [PATH], :force_save_and_quit [PATH], :plugins, :PLUGIN [ARGS]
Aliases: :w=save, :w!=force_save, :q=quit, :q!=force_quit,
:wq=save_and_quit, :wq!=force_save_and_quit
Save actions: core.save, core.force_save, core.save_and_quit, core.force_save_and_quit
Normal saves recheck LF-normalized disk text; external changes/deletion require force
Force never bypasses snapshot read-only, symlink, or another-buffer path protection
Clean live buffers reload on 250ms metadata checks, including inactive tabs/panes
Reload preserves/clamps views and clears stale undo/redo; snapshots never reload
Dirty buffers keep edits; missing/unreadable/invalid changed files keep text and warn
Buffers: :edit PATH, :buffers, :buffer N, :buffer_next, :buffer_previous, :buffer_delete [N], :buffer_force_delete [N]
Aliases: bnext, bprev, bdelete, bdelete!; arguments and safety rules are unchanged
:quit refuses any dirty buffer; :save_and_quit saves active and quits only if all are clean
:quit refuses any dirty buffer; both save-and-quit commands require all buffers clean
Tabs: :tab.new, :tab.previous, :tab.next, :tab.close, :tab.force_close
Tabs retain pane layouts and independent views; close protects exclusively displayed unsaved edits
Markdown links: :follow_link (primary caret; local files only)