mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 14:25:16 +00:00
Replace tabs with spaces when printing a line for trace output.
This commit is contained in:
parent
1caf56c5fb
commit
c557f0c32b
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user