summaryrefslogtreecommitdiff
path: root/src/panes.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-28 12:24:04 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:14 -0300
commit21d2240b9b86ae5ba0036988b0ed84fbcf18d3af (patch)
treed155d9c7e8f6eb51734cb3dc6544fbf6ceb2e1c5 /src/panes.zig
parentcfcff94ab2b1ff5a0fb61dead60ead09bf892d30 (diff)
downloadpardes-21d2240b9b86ae5ba0036988b0ed84fbcf18d3af.tar.gz
pardes-21d2240b9b86ae5ba0036988b0ed84fbcf18d3af.zip
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 <[email protected]>
Diffstat (limited to 'src/panes.zig')
-rw-r--r--src/panes.zig5
1 files changed, 3 insertions, 2 deletions
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,