summaryrefslogtreecommitdiff
path: root/src/pardes.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/pardes.zig')
-rw-r--r--src/pardes.zig3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pardes.zig b/src/pardes.zig
index 22b43a51..df6d347f 100644
--- a/src/pardes.zig
+++ b/src/pardes.zig
@@ -5968,13 +5968,14 @@ pub const Pardes = struct {
// rendering and nothing else.
// A shell with a clock draws what `advance` stepped; one without
// steps its own `.tick`s and draws while anything animates.
- if (!p.needs_frame and !p.continuous() and (v.now != null or !p.animationActive())) return;
+ if (!p.needs_frame and !p.continuous() and (v.now != null or !p.animationActive())) return p.frames.idle();
// No one to see it: the frame stays owed (needs_frame), not drawn.
// A pty streaming into an unwatched session spent most of its time
// drawing what nobody looked at.
if (v.watched) |f| if (!f(h.ctx)) return;
_ = p.frame_arena.reset(.{ .retain_with_limit = memory.limits.frame_kept });
p.frames.mark_update = FrameStats.nowNs();
+ p.frames.view = if (p.panes[p.active]) |pane| pane.scroll() else 0;
const surface = try p.render(p.frame_arena.allocator());
p.frames.mark_render = FrameStats.nowNs();
if (v.present) |f| f(h.ctx, surface);