mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-09 19:10:38 +00:00
Fix #11485: new run on same line must not use last_space of previous run as cut-off point
Use the start of the next run instead as the location of the last space.
This commit is contained in:
parent
b1812751e0
commit
32ab765792
@ -256,6 +256,11 @@ std::unique_ptr<const ParagraphLayouter::Line> FallbackParagraphLayout::NextLine
|
|||||||
|
|
||||||
next_run = this->buffer_begin + iter->first;
|
next_run = this->buffer_begin + iter->first;
|
||||||
begin = this->buffer;
|
begin = this->buffer;
|
||||||
|
/* Since a next run is started, there is already some text that
|
||||||
|
* will be shown for this line. However, we do not want to break
|
||||||
|
* this line at the previous space, so pretend we passed a space
|
||||||
|
* just before this next run. */
|
||||||
|
last_space = begin - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsWhitespace(c)) last_space = this->buffer;
|
if (IsWhitespace(c)) last_space = this->buffer;
|
||||||
|
Loading…
Reference in New Issue
Block a user