diff options
Diffstat (limited to 'src/pardes.zig')
| -rw-r--r-- | src/pardes.zig | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/pardes.zig b/src/pardes.zig index 3721cc32..c7ae6704 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -7813,6 +7813,16 @@ pub const Pardes = struct { const wait = @max(1, (pane.repl_enter_due_ns -| p.stepped_ns + animation.frame_ns - 1) / animation.frame_ns); frames = if (frames) |soonest| @min(soonest, wait) else wait; }; + // A terminal's kitty animation, at its next frame. Only a time still + // ahead counts: a pane not drawn keeps the last one it was given, + // and a past one would wake every frame for nothing. + if (comptime terminal_panes) for (p.panes) |slot| if (slot) |pane| if (panes.terminal.animationDueMs(pane)) |due_ms| { + const due = due_ms *| std.time.ns_per_ms; + if (due > p.stepped_ns) { + const wait = @max(1, (due - p.stepped_ns + animation.frame_ns - 1) / animation.frame_ns); + frames = if (frames) |soonest| @min(soonest, wait) else wait; + } + }; return if (frames) |n| p.stepped_ns + n * animation.frame_ns else null; } |
