diff options
Diffstat (limited to 'src/terminal.zig')
| -rw-r--r-- | src/terminal.zig | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/terminal.zig b/src/terminal.zig index acc7efdf..29a28e85 100644 --- a/src/terminal.zig +++ b/src/terminal.zig @@ -687,7 +687,7 @@ pub fn followOutput(pane: *Pane) void { /// Reflow the grid. A failed reflow keeps the grid it had rather than dropping /// a scrollback; the next resize retries with the same numbers. -pub fn resizeGrid(pane: *Pane, gpa: std.mem.Allocator, cols: u16, rows: u16) void { +pub fn resizeGrid(pane: *Pane, cols: u16, rows: u16) void { if (comptime !enabled) return; if (authorityOnly("resize a terminal")) return; const state = pane.terminal orelse return; @@ -705,7 +705,6 @@ pub fn resizeGrid(pane: *Pane, gpa: std.mem.Allocator, cols: u16, rows: u16) voi return; } state.changes +%= 1; - _ = gpa; state.vt.resize(state.gpa, .{ .cols = cols, .rows = rows }) catch {}; } @@ -1065,7 +1064,7 @@ test "document construction allocates only the pane and has inert terminal defau try std.testing.expect(!promptInputReady(pane)); scrollGrid(pane, 100); followOutput(pane); - resizeGrid(pane, allocator, 80, 24); + resizeGrid(pane, 80, 24); try std.testing.expectEqual(GridCursor{}, gridCursor(pane)); try std.testing.expectEqual(Scrollbar{}, scrollbar(pane)); try std.testing.expectEqualStrings("", try screenTextAlloc(pane, allocator)); |
