summaryrefslogtreecommitdiff
path: root/src/body_layer.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/body_layer.zig')
-rw-r--r--src/body_layer.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/body_layer.zig b/src/body_layer.zig
index 027dfffb..b514cabe 100644
--- a/src/body_layer.zig
+++ b/src/body_layer.zig
@@ -169,14 +169,14 @@ pub fn buttonInks(th: *const colors.Theme) [3][3]u8 {
/// rows the grid cannot show, and is painted straight onto the grid. The
/// rail is the grid's alone.
pub fn joinBody(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, r: Rect, id: usize, active: bool, rail: pardes.Region) !void {
- if (pane.file == null) return renderBody(p, s, arena, pane, r, id, active, rail, null);
+ if (pane.file == null) return renderBody(p, s, arena, pane, r, id, active, rail);
// The pane's geometry as it is (File.geometry): made by the step that
// moved it if one read it, else here, and the same either way.
panes.File.geometry(pane);
// Which rows are context rows is decided by the text the body shows: a
// layer taller than the grid's rows when there are any.
if (!p.settings.tree_context_tag_style or pane.collapsed or r.h <= pane.tag_rows or pane.body_rows == 0)
- return renderBody(p, s, arena, pane, r, id, active, rail, null);
+ return renderBody(p, s, arena, pane, r, id, active, rail);
const viewport_rows = r.h - pane.tag_rows;
const logical_rows: usize = pane.body_rows;
const width = r.w - config.GUTTER;
@@ -187,7 +187,7 @@ pub fn joinBody(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane,
@memset(temporary_cells, .{});
var temporary: Surface = .{ .cols = r.w, .rows = @intCast(logical_rows + pane.tag_rows), .cells = temporary_cells };
const synthetic: Rect = .{ .x = 0, .y = 0, .w = r.w, .h = @intCast(logical_rows + pane.tag_rows) };
- try renderBody(p, &temporary, arena, pane, synthetic, id, active, null, null);
+ try renderBody(p, &temporary, arena, pane, synthetic, id, active, null);
const first_row: usize = if (p.settings.tag_bottom) 0 else pane.tag_rows;
for (0..logical_rows) |row| {
const start = (row + first_row) * r.w + config.GUTTER;
@@ -229,7 +229,7 @@ pub fn joinBody(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane,
}
}
-pub fn renderBody(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, r: Rect, id: usize, active: bool, rail: ?pardes.Region, built: ?[]const u8) !void {
+pub fn renderBody(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, r: Rect, id: usize, active: bool, rail: ?pardes.Region) !void {
const th = p.theme();
const chrome = p.chromeTheme();
const tx = r.x + config.GUTTER;
@@ -250,7 +250,7 @@ pub fn renderBody(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane
};
const tz_body = tracy.zone(@src(), "bodyText");
const probe_text = pardes.FrameStats.nowNs();
- const body = built orelse try bodyText(p, arena, pane);
+ const body = try bodyText(p, arena, pane);
p.frames.zone(.body_text, probe_text);
tz_body.end();
// A select sweep begun on the tag and dragged into the body marks the