diff options
author | richard <none@none> | 2010-01-06 12:40:44 -0800 |
---|---|---|
committer | richard <none@none> | 2010-01-06 12:40:44 -0800 |
commit | a1e342b3f711c7ea23ac60b016c8b4024bf18a4a (patch) | |
tree | db8811781e59231e3cba9f5058adbe72cec64aa7 /indra/llui/lltextbase.cpp | |
parent | 7586d8fcfde811cb04fb1c95aa0aa235b8df6aff (diff) | |
parent | 49660730308fb6d5301d1617402a353a21e9d9be (diff) |
merge
Diffstat (limited to 'indra/llui/lltextbase.cpp')
-rw-r--r-- | indra/llui/lltextbase.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 7447a984ac..5ebf49c488 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -2509,10 +2509,15 @@ S32 LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin // set max characters to length of segment, or to first newline max_chars = llmin(max_chars, last_char - (mStart + segment_offset)); + // if no character yet displayed on this line, don't require word wrapping since + // we can just move to the next line, otherwise insist on it so we make forward progress + LLFontGL::EWordWrapStyle word_wrap_style = (line_offset == 0) + ? LLFontGL::WORD_BOUNDARY_IF_POSSIBLE + : LLFontGL::ONLY_WORD_BOUNDARIES; S32 num_chars = mStyle->getFont()->maxDrawableChars(text.c_str() + segment_offset + mStart, (F32)num_pixels, max_chars, - TRUE); + word_wrap_style); if (num_chars == 0 && line_offset == 0 |