| ... | @@ -357,16 +357,18 @@ pub const AllErrors = struct { | ... | @@ -357,16 +357,18 @@ pub const AllErrors = struct { |
| 357 | ttyconf.setColor(stderr, .Bold); | 357 | ttyconf.setColor(stderr, .Bold); |
| 358 | try stderr.print(" {s}\n", .{src.msg}); | 358 | try stderr.print(" {s}\n", .{src.msg}); |
| 359 | ttyconf.setColor(stderr, .Reset); | 359 | ttyconf.setColor(stderr, .Reset); |
| 360 | if (src.source_line) |line| { | 360 | if (ttyconf != .no_color) { |
| 361 | for (line) |b| switch (b) { | 361 | if (src.source_line) |line| { |
| 362 | '\t' => try stderr.writeByte(' '), | 362 | for (line) |b| switch (b) { |
| 363 | else => try stderr.writeByte(b), | 363 | '\t' => try stderr.writeByte(' '), |
| 364 | }; | 364 | else => try stderr.writeByte(b), |
| 365 | try stderr.writeByte('\n'); | 365 | }; |
| 366 | try stderr.writeByteNTimes(' ', src.column); | 366 | try stderr.writeByte('\n'); |
| 367 | ttyconf.setColor(stderr, .Green); | 367 | try stderr.writeByteNTimes(' ', src.column); |
| 368 | try stderr.writeAll("^\n"); | 368 | ttyconf.setColor(stderr, .Green); |
| 369 | ttyconf.setColor(stderr, .Reset); | 369 | try stderr.writeAll("^\n"); |
| | 370 | ttyconf.setColor(stderr, .Reset); |
| | 371 | } |
| 370 | } | 372 | } |
| 371 | for (src.notes) |note| { | 373 | for (src.notes) |note| { |
| 372 | try note.renderToStdErrInner(ttyconf, stderr_file, "note:", .Cyan, indent); | 374 | try note.renderToStdErrInner(ttyconf, stderr_file, "note:", .Cyan, indent); |