| ... | ... | @@ -1,6 +1,5 @@ |
| 1 | 1 | const std = @import("std"); |
| 2 | 2 | const ansi = @import("ansi"); |
| 3 | | const range = @import("range").range; |
| 4 | 3 | |
| 5 | 4 | pub fn answer(out: anytype, comptime prompt: []const u8, comptime T: type, comptime valfmt: []const u8, value: T) !T { |
| 6 | 5 | try out.print(comptime ansi.color.Fg(.Green, "? "), .{}); |
| ... | ... | @@ -35,7 +34,7 @@ fn doprompt(out: anytype, in: anytype, alloc: std.mem.Allocator, default: ?[]con |
| 35 | 34 | } |
| 36 | 35 | |
| 37 | 36 | fn clean(out: anytype, n: usize) !void { |
| 38 | | for (range(n)) |_| { |
| 37 | for (0..n) |_| { |
| 39 | 38 | try out.print(comptime ansi.csi.CursorUp(1), .{}); |
| 40 | 39 | try out.print(comptime ansi.csi.EraseInLine(0), .{}); |
| 41 | 40 | } |