diff options
Diffstat (limited to 'replay.zig')
| -rw-r--r-- | replay.zig | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -165,6 +165,10 @@ fn paneVWeight(panes: []const Pane, id: usize) ?f32 { return panes[id].vweight; } +fn setPaneVWeight(panes: []Pane, id: usize, weight: f32) void { + panes[id].vweight = weight; +} + fn renderPane(alloc: std.mem.Allocator, root: ui.Window, p: *Pane, r: Rect, active: bool) !void { if (r.w <= GUTTER or r.h == 0) return; const text = root.child(.{ .x_off = r.x + GUTTER, .y_off = r.y, .width = r.w - GUTTER, .height = r.h }); @@ -629,7 +633,7 @@ const App = struct { self.panes[b].vweight = pair - self.panes[a].vweight; } }, - .move => |d| moveTerm(&self.layout, &self.rects, &self.col_x, &self.col_w, d.id, d.cur_x, d.cur_y), + .move => |d| moveTerm(&self.layout, self.panes, &self.rects, &self.col_x, &self.col_w, d.id, d.cur_x, d.cur_y, setPaneVWeight), .none => {}, } self.drag = .none; |
