diff options
Diffstat (limited to 'src/Core.zig')
| -rw-r--r-- | src/Core.zig | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/Core.zig b/src/Core.zig index 7fe4f2e4..4584e395 100644 --- a/src/Core.zig +++ b/src/Core.zig @@ -1417,11 +1417,12 @@ pub fn pump(p: *Pardes, host: Host) !void { // 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; - // The other views first, each into its own window or terminal. - if (Views.several(p)) try Views.drawOthers(p, h); - // A replica client's view live (its input the last): its own - // process draws it. - if (p.undrawn & (@as(u8, 1) << @intCast(p.live)) == 0) { + // The one view this process shows (a replica client's is its own + // process's to draw), drawn as it is if another's is live. + const shown = Views.shown(p); + if (shown != p.live) { + if (shown) |k| try Views.drawOne(p, k, .{ .ctx = h.ctx, .f = v.present }); + } else { _ = p.frame_arena.reset(.{ .retain_with_limit = memory.limits.frame_kept }); p.frames.mark_update = FrameStats.nowNs(); p.frames.view = if (p.panes[p.view().active]) |pane| pane.scroll() else 0; |
