mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 18:19:03 +00:00
AK+Everywhere: Fix compiletime format parsing of replacement fields
This commit is contained in:
parent
c0d1a75881
commit
944855ca18
Notes:
sideshowbarker
2024-07-18 17:03:02 +09:00
Author: https://github.com/alimpfard
Commit: 944855ca18
Pull-request: https://github.com/SerenityOS/serenity/pull/7673
Reviewed-by: https://github.com/linusg ✅
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