summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/Term.zig2
-rw-r--r--core/draw.zig3
-rw-r--r--core/surface.zig4
-rw-r--r--core/term/terminal.zig1
4 files changed, 8 insertions, 2 deletions
diff --git a/core/Term.zig b/core/Term.zig
index 2f0a0f3f..32b98cd9 100644
--- a/core/Term.zig
+++ b/core/Term.zig
@@ -425,7 +425,7 @@ pub const calls = [_]struct { []const u8, []const u8, []const u8 }{
.{ "replies", "Core.zig:1", "WRITE: a step drains the reply buffer (in the digest), counted when it held any (the feed's own unit, which filled it); only the session writes it to the pty (pty_write is off the tape)" },
// ---- reads by a step: in the digest ----
.{ "grid", "Core.zig:3 ansi.zig:3 body_layer.zig:3 draw.zig:2 dump.zig:4 echo.zig:8 exec.zig:2 layout.zig:2 panes.zig:6 replica.zig:2", "READ: the size, the history's length, the cursor: in the digest (a view's place is its pane's; ansi.zig, body_layer.zig, draw.zig, echo.zig: a draw's)" },
- .{ "modes", "Core.zig:5 draw.zig:1 dump.zig:2 echo.zig:3 exec.zig:3 mouse.zig:4 ninep/pty.zig:3 panes.zig:2 replica.zig:1", "READ: the program's modes (mouse, focus, bracketed paste, the alternate screen): in the digest (draw.zig, echo.zig: a draw's; panes.zig: a view scrolls no history on the alternate screen)" },
+ .{ "modes", "Core.zig:5 draw.zig:2 dump.zig:2 echo.zig:3 exec.zig:3 mouse.zig:4 ninep/pty.zig:3 panes.zig:2 replica.zig:1", "READ: the program's modes (mouse, focus, bracketed paste, the alternate screen, a frame under way): in the digest (draw.zig, echo.zig: a draw's; panes.zig: a view scrolls no history on the alternate screen)" },
.{ "prompt", "Core.zig:1 builtins.zig:1 echo.zig:1 exec.zig:3 ninep/pty.zig:1 panes.zig:1", "READ: the OSC 133 cycle: in the digest (`marksOf`); Core.zig's and ninep/pty.zig's also taped (`.prompt`, each side's compared)" },
.{ "promptPrefix", "body_layer.zig:1 edit.zig:1 exec.zig:1", "READ: a row's prompt cells (`promptCut`): the active area's in the digest; a history row's text is not (below)" },
.{ "hasImages", "replica.zig:3 tagline.zig:1", "READ: whether it holds a kitty image (the tag's prefix): in the digest" },
diff --git a/core/draw.zig b/core/draw.zig
index 648808aa..3146df3f 100644
--- a/core/draw.zig
+++ b/core/draw.zig
@@ -114,7 +114,8 @@ pub fn place(p: *Pardes, s: *Surface) void {
// view moved are another text's); none for a terminal or a picture.
const doc: u64 = if (pane.file) |f| std.hash.Wyhash.hash(if (f.output != null) f.revision else 0, f.path) else 0;
const row: u32 = if (pane.file != null) panes.File.top(p.settings.tab, pane).row else 0;
- s.addRegion(.{ .kind = .body, .owner = owner, .serial = pane.serial, .active = active, .line = line, .row = row, .doc = doc, .rect = .{ .x = r.x + config.GUTTER, .y = body_y, .w = r.w - config.GUTTER, .h = body_h } });
+ const held = pane.isTerminal() and panes.Term.modes(pane.terminal).sync;
+ s.addRegion(.{ .kind = .body, .owner = owner, .serial = pane.serial, .active = active, .line = line, .row = row, .doc = doc, .held = held, .rect = .{ .x = r.x + config.GUTTER, .y = body_y, .w = r.w - config.GUTTER, .h = body_h } });
var rail: Region = .{ .kind = .rail, .owner = owner, .serial = pane.serial, .active = active, .rect = .{ .x = r.x, .y = body_y, .w = config.GUTTER, .h = body_h } };
// A kind's rail is its paint's (drawPane); every other pane's is
// here.
diff --git a/core/surface.zig b/core/surface.zig
index 7928c89e..69473bc8 100644
--- a/core/surface.zig
+++ b/core/surface.zig
@@ -142,6 +142,10 @@ pub const Region = struct {
line: i32 = 0,
row: u32 = 0,
doc: u64 = 0,
+ /// A terminal's body whose program is mid-frame (synchronized output,
+ /// 2026): a frontend keeps showing what it showed there until the
+ /// frame is done, as a terminal holds its picture (tui.zig `Held`).
+ held: bool = false,
/// A body drawn as a strip of pictures (a PDF): how far down the strip
/// it shows, in pixels. Its placements are laid at the whole pixel; a
/// pixel frontend draws them the fraction higher.
diff --git a/core/term/terminal.zig b/core/term/terminal.zig
index 1c2310b1..12306957 100644
--- a/core/term/terminal.zig
+++ b/core/term/terminal.zig
@@ -630,6 +630,7 @@ pub fn modes(state: ?*const State) Term.Modes {
.focus = s.vt.modes.get(.focus_event),
.bracketed_paste = s.vt.modes.get(.bracketed_paste),
.alternate = alternate,
+ .sync = s.vt.modes.get(.synchronized_output),
};
}