summaryrefslogtreecommitdiff
path: root/src/tape.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-06 06:24:42 -0300
committerGabriel Schneider <[email protected]>2026-11-06 11:19:44 -0300
commitc1917b949b9580de8bf0977874a210f0266812da (patch)
tree447dd2235ea00634f662cd3becf4bceb8a895f41 /src/tape.zig
parent76c55b5bce0f181b0b15b16596c900397dfef544 (diff)
downloadpardes-c1917b949b9580de8bf0977874a210f0266812da.tar.gz
pardes-c1917b949b9580de8bf0977874a210f0266812da.zip
kinds #14, the core's PDF code gone: pdf.zig and pdf_view.zig leave and every pdf_enabled branch with them; look, Jump, Recent, dumps (one from before the addon opens as its pane), the watch, mouse, keys, the rail and the tag go through Kind for any kind's pane; test/pdf.zig's behaviours are T1 cases over 9P (addons_pdf.zig) and pane cases (a Shadow over a replica, a file changed under it), the harnesses load pdf.so by path
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/tape.zig')
-rw-r--r--src/tape.zig12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/tape.zig b/src/tape.zig
index cd777f96..2354fb06 100644
--- a/src/tape.zig
+++ b/src/tape.zig
@@ -573,7 +573,6 @@ pub const Tape = struct {
};
const gpa = t.core_gpa orelse t.gpa;
opts.image_allocator = gpa;
- opts.pdf_allocator = gpa;
opts.tree_sitter_allocator = gpa;
opts.frame_allocator = gpa;
t.core = switch (input) {
@@ -1033,6 +1032,12 @@ pub fn speculating() bool {
return if (on) |t| t.speculating else false;
}
+/// Inside a step: one being recorded, a replica's replay of one, or its
+/// speculation. A read made between steps (a frame drawn) is none.
+pub fn stepping() bool {
+ return if (on) |t| t.depth > 0 or t.replay or t.speculating else false;
+}
+
/// Screen-state terminals, on either side (`Tape.screen_state`).
pub fn screenState() bool {
return if (on) |t| t.screen_state else false;
@@ -1242,10 +1247,7 @@ pub fn startFromEnv() void {
pub fn replayMain(io: std.Io, path: []const u8) u8 {
const gpa = std.heap.c_allocator;
// What a shell starts before its core (tui.zig's localSession).
- if (comptime pardes.pdf_enabled) {
- pardes.TerminalImages.start(io, gpa);
- pardes.pdf.start(gpa);
- }
+ pardes.TerminalImages.start(io, gpa);
pardes.syntax.start(gpa);
const bytes = std.Io.Dir.cwd().readFileAlloc(std.Io.Threaded.global_single_threaded.io(), path, gpa, .unlimited) catch |err| {
std.debug.print("replay: cannot read {s}: {t}\n", .{ path, err });