authorgravatar for jahe788@gmail.comIntegratedQuantum <jahe788@gmail.com> 2022-12-28 14:25:07+01:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-12-29 12:50:31+02:00
logc557f0c32b9effd748ad158455371ab8d5843c38
treed1324084471107e20140954bfb10003c51111917
parent1caf56c5fbbb10fa28f8bf204d073983ce2a6dd5

Replace tabs with spaces when printing a line for trace output.


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

lib/std/debug.zig+4-1
...@@ -1128,7 +1128,10 @@ fn printLineFromFileAnyOs(out_stream: anytype, line_info: LineInfo) !void {...@@ -1128,7 +1128,10 @@ fn printLineFromFileAnyOs(out_stream: anytype, line_info: LineInfo) !void {
11281128
1129 for (slice) |byte| {1129 for (slice) |byte| {
1130 if (line == line_info.line) {1130 if (line == line_info.line) {
1131 try out_stream.writeByte(byte);1131 switch (byte) {
1132 '\t' => try out_stream.writeByte(' '),
1133 else => try out_stream.writeByte(byte),
1134 }
1132 if (byte == '\n') {1135 if (byte == '\n') {
1133 return;1136 return;
1134 }1137 }