diff options
Diffstat (limited to 'src/replica.zig')
| -rw-r--r-- | src/replica.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/replica.zig b/src/replica.zig index e229bad5..a18391d4 100644 --- a/src/replica.zig +++ b/src/replica.zig @@ -622,6 +622,11 @@ pub const Replica = struct { const t0 = nowNs(); tape.beginSpeculation(&r.t); c.toView(r.view); + // Input into a terminal is the authority's: its step reads the + // emulator (rows, cursor, modes), which here is the last delta's and + // there what the pty has said since. It waits; phase 6 predicts the + // echo. + if (r.t.screen_state) if (c.panes[c.active]) |pane| if (pane.isTerminal()) tape.poison(); c.update(in.event); c.pump(c.host) catch {}; const clean = tape.endSpeculation(&r.t); @@ -728,6 +733,7 @@ pub const Replica = struct { sc.rep.missing(shown[0], shown[1], &holes, r.gpa) catch return null; if (holes.items.len == 0) continue; const want: [2]u64 = .{ holes.items[0][0], holes.items[holes.items.len - 1][1] }; + sc.rep.blank(&state.vt, want[0], want[1]); sc.asked = want; var range: [16]u8 = undefined; std.mem.writeInt(u64, range[0..8], want[0], .little); |
