Fix handling empty lines at the end of ui::label

This commit is contained in:
Nikita Lisitsa 2022-05-23 20:49:23 +03:00
parent 945b126e64
commit d5baea48dd

View file

@ -437,7 +437,7 @@ namespace psemek::ui
{ {
std::size_t current_item = 0; std::size_t current_item = 0;
while (current_item < items.size()) while (true)
{ {
if (skip_spaces_) if (skip_spaces_)
{ {
@ -485,6 +485,9 @@ namespace psemek::ui
lines.push_back({line_begin, current_item}); lines.push_back({line_begin, current_item});
if (current_item == items.size())
break;
if (newline_end) if (newline_end)
++current_item; ++current_item;
} }