Do not include CR-terminator in line width-height calculations

Fixes #3658
This commit is contained in:
Siarzhuk Zharski 2012-12-16 17:55:46 +01:00
parent 5bda396ef4
commit 0d3bd614c7

View File

@ -4063,7 +4063,9 @@ BTextView::_FindLineBreak(int32 fromOffset, float *outAscent, float *outDescent,
delta = max_c(delta, 1);
deltaWidth = _TabExpandedStyledWidth(offset, delta, &ascent, &descent);
// do not include B_ENTER-terminator into width & height calculations
deltaWidth = _TabExpandedStyledWidth(offset,
done ? delta - 1 : delta, &ascent, &descent);
strWidth += deltaWidth;
if (strWidth >= *inOutWidth) {