Small code tweak
This commit is contained in:
parent
ca0606017f
commit
03dcfb2574
|
@ -423,9 +423,10 @@ Vector<StringView> wrap_lines(StringView text, ColumnCount max_width)
|
|||
++word_end;
|
||||
|
||||
while (word_end > line_begin and
|
||||
StringView{line_begin.base(), word_end.base()}.column_length() >= max_width)
|
||||
utf8::column_distance(line_begin.base(), word_end.base()) >= max_width)
|
||||
{
|
||||
auto line_end = last_word_end <= line_begin ? Utf8It{utf8::advance(line_begin.base(), text.end(), max_width), text}
|
||||
auto line_end = last_word_end <= line_begin ?
|
||||
Utf8It{utf8::advance(line_begin.base(), text.end(), max_width), text}
|
||||
: last_word_end;
|
||||
|
||||
lines.emplace_back(line_begin.base(), line_end.base());
|
||||
|
|
Loading…
Reference in New Issue
Block a user