From 21d2240b9b86ae5ba0036988b0ed84fbcf18d3af Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 12:24:04 -0300 Subject: Restore asks about unsaved text first, as Exit does Restore replaces every pane with a dump's, so a pane edited since its last save lost that text without a word, where Exit asks. acme's Load only adds a dump's windows and so never asks; Restore now asks what Exit asks (acme's rowclean and winclean, wind.c:511-529): each modified pane says so once, and Restore again with nothing edited since goes ahead. Exit and Restore share the check and its warned-at revision, as acme's winclean clears one dirty flag for any asker. Co-Authored-By: Claude Opus 5.5 --- src/panes.zig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/panes.zig') diff --git a/src/panes.zig b/src/panes.zig index 70b461eb..d4b336d7 100644 --- a/src/panes.zig +++ b/src/panes.zig @@ -99,8 +99,9 @@ pub const Pane = struct { /// middle click, a pty/run): its first word, which Kill matches, and /// the shell's command count its start (C mark) reaches. sent_command: ?struct { word: [64]u8 = undefined, len: u8 = 0, seq: u32 = 0 } = null, - /// The revision an Exit last warned this pane was modified at. - exit_warned: ?u32 = null, + /// The revision an Exit or a Restore last warned this pane was modified + /// at (builtins.zig warnModified). + discard_warned: ?u32 = null, /// Native host queues the Linux v9fs launcher in this pane's initial shell. v9fs_on_spawn: bool = false, file: ?File.State = null, -- cgit v1.3