summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--abi/wire.zig6
-rw-r--r--core/Core.zig1
-rw-r--r--core/panes.zig5
-rw-r--r--core/tagline.zig2
-rw-r--r--core/tape.zig3
-rw-r--r--test/daemon.py2
6 files changed, 16 insertions, 3 deletions
diff --git a/abi/wire.zig b/abi/wire.zig
index 88a82e52..d7df7bc3 100644
--- a/abi/wire.zig
+++ b/abi/wire.zig
@@ -10,6 +10,10 @@ const pardes = @import("core");
const config = @import("pardes_options");
const build_info = @import("build_info");
+/// 28: whether a terminal holds a kitty image is the session's, taped
+/// after its output (tape site `images`), and a pane's (Pane.term_images)
+/// in its join's dump and its digest: a screen-state client's tag says
+/// what the session's does;
/// 27: a pair's first client makes its own core from the session's
/// options and says its digest (`boot`) before its `far`: the session sends
/// no dump when its own at the join has the same;
@@ -46,7 +50,7 @@ const build_info = @import("build_info");
/// part B); 14: the hello names a session and
/// carries the semantics hash, and a ping is answered (phase 5's
/// groundwork); 13: the frames went (phase 3).
-pub const version: u16 = 27;
+pub const version: u16 = 28;
/// The terminal's build and the window's step alike (`semantics`).
const family = switch (config.platform) {
diff --git a/core/Core.zig b/core/Core.zig
index 177a6e78..73d0738a 100644
--- a/core/Core.zig
+++ b/core/Core.zig
@@ -1684,6 +1684,7 @@ fn updateInner(p: *Pardes, ev: Event) void {
pane.shell_spoke = true;
ctlfs.events.notePtyOutput(p, o.pane.index(), o.bytes);
pane.feedOutput(p, o.bytes);
+ pane.term_images = if (p.tape.screen_state) p.tape.value(.images, pardes.Term.hasImages, .{pane.terminal}) else pardes.Term.hasImages(pane.terminal);
ctlfs.pty.noteMarks(p, o.pane.index(), pane);
exec.flushReplEnter(p, o.pane.index(), true);
},
diff --git a/core/panes.zig b/core/panes.zig
index 8b152132..2f561d05 100644
--- a/core/panes.zig
+++ b/core/panes.zig
@@ -134,6 +134,11 @@ pub const Pane = struct {
/// cell), and its kitty graphics drawn as glyph art (Petscii).
term_mouse: ?Term.Coordinate = null,
term_petscii: bool = false,
+ /// Whether its terminal holds a kitty image, as the session's emulator
+ /// said after its program's last output (taped under screen state: a
+ /// client's emulator is fed the session's cells, never an image). Its
+ /// tag says so (tagline.zig), on every side.
+ term_images: bool = false,
gpa: std.mem.Allocator,
serial: u32 = 0,
/// What the control filesystem keeps of this pane -- addr and limit, the
diff --git a/core/tagline.zig b/core/tagline.zig
index afee0659..26f83fba 100644
--- a/core/tagline.zig
+++ b/core/tagline.zig
@@ -160,7 +160,7 @@ pub fn pathPrefix(p: *const Pardes, arena: std.mem.Allocator, pane: *Pane) ![]co
if (pane.terminal != null) {
const chosen = pane.term_petscii;
const on = chosen or !p.view().frontend.native_images;
- if (chosen or panes.Term.hasImages(pane.terminal))
+ if (chosen or pane.term_images)
return std.fmt.allocPrint(arena, "{s} petscii:{s}", .{ (try shownDir(arena, pane)), if (on) "on" else "off" });
}
return (try shownDir(arena, pane));
diff --git a/core/tape.zig b/core/tape.zig
index d32f8dd8..f231831d 100644
--- a/core/tape.zig
+++ b/core/tape.zig
@@ -140,6 +140,9 @@ pub const Site = enum(u16) {
/// A kitty image's medium as a terminal's emulator read it (a file, a
/// temporary file, shared memory: Term.media), its bytes or its failure.
medium,
+ /// Whether a terminal holds a kitty image after its program's output
+ /// (Pane.term_images): a screen-state replica's emulator never has one.
+ images,
};
/// What the sites return. wire.semantics hashes their shape with the
diff --git a/test/daemon.py b/test/daemon.py
index e1be141a..e334b6e8 100644
--- a/test/daemon.py
+++ b/test/daemon.py
@@ -258,7 +258,7 @@ class Replica:
"""A replica's connection (abi/wire.zig): length-prefixed
messages, a tag byte and a little-endian u32 length. It is a near
client: its first word after the hello says so."""
- WIRE = 27
+ WIRE = 28
def __init__(self, path, timeout=10):
self.path, self.timeout = path, timeout