authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-05-20 15:20:27-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-05-20 15:20:27-07:00
log3845c264a6880a810a381ab4f7d0c03514350200
treed2b9b67f93963025eb8a3168b8c314d895101082
parent34d0542a539a1993a602e3e461f6297fb4d78d0c

stage2: fix compile error rendering for hard tabs

render them as 1 space instead. This fixes the column caret.

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

src/Compilation.zig+4-1
......@@ -354,7 +354,10 @@ pub const AllErrors = struct {
354354 try stderr.print(" {s}\n", .{src.msg});
355355 ttyconf.setColor(stderr, .Reset);
356356 if (src.source_line) |line| {
357 try stderr.writeAll(line);
357 for (line) |b| switch (b) {
358 '\t' => try stderr.writeByte(' '),
359 else => try stderr.writeByte(b),
360 };
358361 try stderr.writeByte('\n');
359362 try stderr.writeByteNTimes(' ', src.column);
360363 ttyconf.setColor(stderr, .Green);