summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/Core.zig1
-rw-r--r--core/panes.zig5
-rw-r--r--core/tagline.zig2
-rw-r--r--core/tape.zig3
4 files changed, 10 insertions, 1 deletions
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