diff options
Diffstat (limited to 'src/tape.zig')
| -rw-r--r-- | src/tape.zig | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/tape.zig b/src/tape.zig index 68413315..608ad6ff 100644 --- a/src/tape.zig +++ b/src/tape.zig @@ -1062,6 +1062,14 @@ pub fn poison(why: []const u8) void { }; } +/// A replica's speculation leaves what is the authority's be (a terminal's +/// emulator, a kind's state): true, and the input waits for its order. +pub fn authorityOnly(comptime why: []const u8) bool { + if (!speculating()) return false; + poison(why); + return true; +} + /// A speculation read a terminal's rows or moved its view (`Tape.touched`). pub fn touchTerminal() void { if (on) |t| if (t.speculating) { @@ -1247,7 +1255,7 @@ pub fn startFromEnv() void { pub fn replayMain(path: []const u8) u8 { const gpa = std.heap.c_allocator; // What a shell starts before its core (tui.zig's localSession). - pardes.TerminalImages.start(gpa); + pardes.Term.start(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 }); |
