mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-02 12:48:14 +00:00
Fix displaying emptiness when error is on first line
This commit is contained in:
@@ -64,6 +64,11 @@ gb_internal gbString get_file_line_as_string(TokenPos const &pos, i32 *offset_)
|
|||||||
}
|
}
|
||||||
line_start -= 1;
|
line_start -= 1;
|
||||||
}
|
}
|
||||||
|
if (line_start == start - 1) {
|
||||||
|
// Prevent an error on the first line from stepping behind the boundary
|
||||||
|
// of the text.
|
||||||
|
line_start += 1;
|
||||||
|
}
|
||||||
|
|
||||||
while (line_end < end) {
|
while (line_end < end) {
|
||||||
if (*line_end == '\n') {
|
if (*line_end == '\n') {
|
||||||
|
|||||||
Reference in New Issue
Block a user