1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 10:18:13 +00:00

LibLine: Fix save line condition

Fix condition used by actual_rendered_string_length_step() to
check if the line reached the desired length.
This commit is contained in:
Matteo Benetti 2022-11-10 21:13:52 +01:00 committed by Ali Mohammad Pur
parent ff6055e0a3
commit f84b2e9e7d

View file

@ -1909,7 +1909,7 @@ VTState actual_rendered_string_length_step(StringMetrics& metrics, size_t index,
};
// FIXME: current_line.visible_length can go above maximum_line_width when using masks
if (maximum_line_width.has_value() && maximum_line_width.value() >= current_line.visible_length)
if (maximum_line_width.has_value() && current_line.visible_length >= maximum_line_width.value())
save_line();
ScopeGuard bit_length_update { [&last_return, &current_line, &index]() {