mirror of
https://github.com/ziglang/zig.git
synced 2026-11-22 04:37:39 -05:00
Fix the color of compiler messages for light-themed terminal.
This commit is contained in:
1 parent
76f3bdfff8
commit
fea016afc0
3 files changed
+10
-4
No files matched your search
+4
-4
@@ -24,20 +24,20 @@ static void print_err_msg_type(ErrorMsg *err, ErrColor color, ErrType err_type)
|
||||
bool is_tty = os_stderr_tty();
|
||||
if (color == ErrColorOn || (color == ErrColorAuto && is_tty)) {
|
||||
if (err_type == ErrTypeError) {
|
||||
os_stderr_set_color(TermColorWhite);
|
||||
os_stderr_set_color(TermColorBold);
|
||||
fprintf(stderr, "%s:%" ZIG_PRI_usize ":%" ZIG_PRI_usize ": ", path, line, col);
|
||||
os_stderr_set_color(TermColorRed);
|
||||
fprintf(stderr, "error:");
|
||||
os_stderr_set_color(TermColorWhite);
|
||||
os_stderr_set_color(TermColorBold);
|
||||
fprintf(stderr, " %s", text);
|
||||
os_stderr_set_color(TermColorReset);
|
||||
fprintf(stderr, "\n");
|
||||
} else if (err_type == ErrTypeNote) {
|
||||
os_stderr_set_color(TermColorWhite);
|
||||
os_stderr_set_color(TermColorBold);
|
||||
fprintf(stderr, "%s:%" ZIG_PRI_usize ":%" ZIG_PRI_usize ": ", path, line, col);
|
||||
os_stderr_set_color(TermColorCyan);
|
||||
fprintf(stderr, "note:");
|
||||
os_stderr_set_color(TermColorWhite);
|
||||
os_stderr_set_color(TermColorBold);
|
||||
fprintf(stderr, " %s", text);
|
||||
os_stderr_set_color(TermColorReset);
|
||||
fprintf(stderr, "\n");
|
||||
|
||||
Reference in new issue
Block a user