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

This commit is contained in:
IntegratedQuantum 2022-12-28 14:25:07 +01:00 committed by Veikka Tuominen
parent 1caf56c5fb
commit c557f0c32b

View File

@ -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;
}