diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-09 04:08:35 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-09 23:51:42 -0300 |
| commit | 76ac996933d356b44458afc0aee76c758aeb4b26 (patch) | |
| tree | de90873fd74aef53fcf57cb2e5791c9588e9f343 /src | |
| parent | 773b2196f87974ce66f50c23b7708dc5214ec98d (diff) | |
| download | pardes-76ac996933d356b44458afc0aee76c758aeb4b26.tar.gz pardes-76ac996933d356b44458afc0aee76c758aeb4b26.zip | |
soak: a tty replica client draws its own motions (the glide, a jump's trail) a frame a tick while they move, as the local loop's waitInput does: its loop woke only for an event, so a wheel's glide showed nothing until the next key (instant's tty scroll_wheel 56% at once, p99 624 ms, through the box and at 0 ms alike)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src')
| -rw-r--r-- | src/tui/tui.zig | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tui/tui.zig b/src/tui/tui.zig index af274b3f..df51960e 100644 --- a/src/tui/tui.zig +++ b/src/tui/tui.zig @@ -759,6 +759,15 @@ pub fn remote(init: std.process.Init, opts: pardes.Options, path: []const u8, se // Its predicted echo judged and caught up, once a frame. if (r.echoFrame()) link.dirty = true; if (link.dirty) remote_link.draw(&sh); + // The tty's own motions (its glide, a jump's trail) drawn a frame + // a tick while they move, as waitInput wakes the local loop: a + // wheel's glide was drawn only at the next event. After the + // draw, which starts a glide, and after the last iteration's + // wakes, as the latest asked for is the one kept. + if (sh.moving()) { + link.dirty = true; + requestWake(io, @intCast(pardes.frame_ns / std.time.ns_per_ms)); + } const first = (loop.tryEvent() catch null) orelse idle: { // Idle, its frame drawn: the next key needs no copy taken. r.ready(); |
