Commit c557f0c32b

IntegratedQuantum <jahe788@gmail.com>
2022-12-28 14:25:07
Replace tabs with spaces when printing a line for trace output.
1 parent 1caf56c
Changed files (1)
lib
lib/std/debug.zig
@@ -1128,7 +1128,10 @@ fn printLineFromFileAnyOs(out_stream: anytype, line_info: LineInfo) !void {
 
         for (slice) |byte| {
             if (line == line_info.line) {
-                try out_stream.writeByte(byte);
+                switch (byte) {
+                    '\t' => try out_stream.writeByte(' '),
+                    else => try out_stream.writeByte(byte),
+                }
                 if (byte == '\n') {
                     return;
                 }