authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2022-11-15 10:14:05 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2022-11-15 10:14:05 -08:00
log25e35a46400cfa1d7278436c0b7d14d314889d7c
tree70d74b2d3c498203788711761cf9198b77872481
parent14c3492c46f9765c3e77436741794d1a3118cbee

use slightly bigger buffer to store line input


1 files changed, 1 insertions(+), 1 deletions(-)

src/lib.zig+1-1
...@@ -19,7 +19,7 @@ fn doprompt(out: anytype, in: anytype, alloc: std.mem.Allocator, default: ?[]con...@@ -19,7 +19,7 @@ fn doprompt(out: anytype, in: anytype, alloc: std.mem.Allocator, default: ?[]con
19 var value: []const u8 = undefined;19 var value: []const u8 = undefined;
20 while (true) : (n += 1) {20 while (true) : (n += 1) {
21 try out.print(comptime ansi.color.Faint("> "), .{});21 try out.print(comptime ansi.color.Faint("> "), .{});
22 var input: []const u8 = try in.readUntilDelimiterAlloc(alloc, '\n', 100);22 var input: []const u8 = try in.readUntilDelimiterAlloc(alloc, '\n', 1024);
23 input = std.mem.trimRight(u8, input, "\r\n");23 input = std.mem.trimRight(u8, input, "\r\n");
2424
25 if (input.len == 0) if (default) |d| {25 if (input.len == 0) if (default) |d| {