summaryrefslogtreecommitdiff
path: root/src/draw.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/draw.zig')
-rw-r--r--src/draw.zig12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/draw.zig b/src/draw.zig
index a0a28cc7..a779d588 100644
--- a/src/draw.zig
+++ b/src/draw.zig
@@ -58,7 +58,7 @@ pub fn place(p: *Pardes, s: *Surface) void {
// A folded pane is its tag rows and nothing else.
if (pane.collapsed) continue;
const body_h = r.h -| pane.tag_rows;
- const line: i32 = if (pane.file) |f| @intCast(@min(f.scroll, std.math.maxInt(i32))) else if (pane.isTerminal()) panes.terminal.gridOffset(pane) else 0;
+ const line: i32 = if (pane.file) |f| @intCast(@min(f.scroll, std.math.maxInt(i32))) else if (pane.isTerminal()) @intCast(panes.Term.grid(pane.terminal).offset) else 0;
// The text it shows, for a frontend's glide to tell apart: a file's
// path, a generated text's revision with it (rows rewritten as its
// view moved are another text's); none for a terminal or a picture.
@@ -73,8 +73,8 @@ pub fn place(p: *Pardes, s: *Surface) void {
.offset = f.scroll,
.len = pane.rows,
} else blk: {
- const gsb = panes.terminal.scrollbar(pane);
- break :blk .{ .total = gsb.total, .offset = gsb.offset, .len = gsb.len };
+ const grid = panes.Term.grid(pane.terminal);
+ break :blk .{ .total = grid.total, .offset = grid.offset, .len = grid.len };
};
const track_h: usize = body_h;
const total = if (sb.total == 0) 1 else sb.total;
@@ -413,9 +413,9 @@ pub fn render(p: *Pardes, arena: std.mem.Allocator) !*Surface {
sb_off = 0;
sb_total = 0;
} else {
- const sb = panes.terminal.scrollbar(at);
- sb_off = sb.offset;
- sb_total = sb.total;
+ const grid = panes.Term.grid(at.terminal);
+ sb_off = grid.offset;
+ sb_total = grid.total;
}
const effective_font = p.settings.font.effective_name.get();
const font_name = if (effective_font.len == 0) "default" else effective_font;