mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-05-26 14:58:35 +00:00
cli: use a caller-provided write buffer
This follows Zig's conventions more closely, where the caller owns the write buffer.
This commit is contained in:
@@ -94,7 +94,8 @@ pub fn run(alloc: Allocator) !u8 {
|
||||
|
||||
var pager: Pager = if (!no_pager) .init(alloc) else .{};
|
||||
defer pager.deinit();
|
||||
const writer = pager.writer();
|
||||
var buffer: [4096]u8 = undefined;
|
||||
const writer = pager.writer(&buffer);
|
||||
|
||||
if (text) |t| {
|
||||
try writer.writeAll(t);
|
||||
|
||||
Reference in New Issue
Block a user