mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 21:08:12 +00:00
AK+Everywhere: Fix compiletime format parsing of replacement fields
This commit is contained in:
parent
c0d1a75881
commit
944855ca18
3 changed files with 17 additions and 12 deletions
|
@ -1998,16 +1998,16 @@ void Shell::possibly_print_error() const
|
|||
warn("\x1b[31m");
|
||||
size_t length_written_so_far = 0;
|
||||
if (line == (i64)source_position.position->start_line.line_number) {
|
||||
warn(StringView { "{:~>{}}" }, "", 5 + source_position.position->start_line.line_column);
|
||||
warn("{:~>{}}", "", 5 + source_position.position->start_line.line_column);
|
||||
length_written_so_far += source_position.position->start_line.line_column;
|
||||
} else {
|
||||
warn(StringView { "{:~>{}}" }, "", 5);
|
||||
warn("{:~>{}}", "", 5);
|
||||
}
|
||||
if (line == (i64)source_position.position->end_line.line_number) {
|
||||
warn(StringView { "{:^>{}}" }, "", source_position.position->end_line.line_column - length_written_so_far);
|
||||
warn("{:^>{}}", "", source_position.position->end_line.line_column - length_written_so_far);
|
||||
length_written_so_far += source_position.position->start_line.line_column;
|
||||
} else {
|
||||
warn(StringView { "{:^>{}}" }, "", current_line.length() - length_written_so_far);
|
||||
warn("{:^>{}}", "", current_line.length() - length_written_so_far);
|
||||
}
|
||||
warnln("\x1b[0m");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue