mirror of https://github.com/buggins/dlangui.git
fix off-by-one error in SimpleTextFormatter line splitting where last char of last word was sent to next line
This commit is contained in:
parent
5d48ae8fc4
commit
a59e876622
|
@ -502,8 +502,8 @@ struct SimpleTextFormatter {
|
|||
if (ch == '\t' || ch == ' ') {
|
||||
// track last word end
|
||||
if (prevChar != '\t' && prevChar != ' ' && prevChar != 0) {
|
||||
lastWordEnd = i - 1;
|
||||
lastWordEndX = widths[i - 1];
|
||||
lastWordEnd = i;
|
||||
lastWordEndX = widths[i];
|
||||
}
|
||||
prevChar = ch;
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue