diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-28 13:35:24 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:14 -0300 |
| commit | 77c7d0bae3b69dc6fccc7cfea7d30aabc1543409 (patch) | |
| tree | 77407ede333bd86494d426a62818d749a46c90d4 /src/pardes.zig | |
| parent | 238e35e89d387f3c266b40f107e9419ea75d77bb (diff) | |
| download | pardes-77c7d0bae3b69dc6fccc7cfea7d30aabc1543409.tar.gz pardes-77c7d0bae3b69dc6fccc7cfea7d30aabc1543409.zip | |
With no frontend attached, a detached session's messages go after MessageLinger
A message lingers until input dismisses it, and a detached session with nobody
attached has no input: its messages, and /screen, kept what was said long ago.
The session now marks the core unattended while no client is attached, and
the core drops a pane's messages once the newest has been up MessageLinger on
the clock, checked as it is stepped or served. A pane's older lines go with
its newest rather than each on its own clock; the render pipeline's clock is
the place for that.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/pardes.zig')
| -rw-r--r-- | src/pardes.zig | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pardes.zig b/src/pardes.zig index c049fa39..2eab3d62 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -3806,6 +3806,9 @@ pub const Pardes = struct { /// it is dragged instead of once on release. native_image_patches: bool = false, quit: bool = false, + /// A detached session with no frontend attached: nothing renders, so + /// no input ever dismisses a message (Messages.expireUnattended). + unattended: bool = false, haptic: HapticSlot = if (platform == .macos) .none else {}, drag: mouse.Drag = .none, hover_col: u16 = 0, @@ -4672,6 +4675,7 @@ pub const Pardes = struct { /// that changes a pane costs a frame, which is why a round trip on a /// local socket costs microseconds and not a vsync. pub fn serveFs(p: *Pardes, req: ctlfs.Req) ctlfs.Reply { + Messages.expireUnattended(p); if (!ctlfs.changesPane(req)) return ctlfs.handle(p, req); p.needs_frame = true; p.raw_hover_intent = false; @@ -4694,6 +4698,7 @@ pub const Pardes = struct { // the screen. p.needs_frame = p.needs_frame or ev != .tick; p.shell_rows.sweep(p.gpa); + Messages.expireUnattended(p); // An announcement stands in only until its own step says more. for (p.panes) |slot| if (slot) |pane| { pane.msg_announcement = false; |
