diff options
author | Jacek Antonelli | 2008-10-03 18:05:46 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-10-03 18:06:00 -0500 |
commit | 04f9d0b7cef929ad9acdea37bf5f826850993c52 (patch) | |
tree | 4f89e6ad443f04b66d562af0bbae7e95cb44dc24 /linden/indra/newview/llconsole.cpp | |
parent | Second Life viewer sources 1.21.3-RC (diff) | |
download | meta-impy-04f9d0b7cef929ad9acdea37bf5f826850993c52.zip meta-impy-04f9d0b7cef929ad9acdea37bf5f826850993c52.tar.gz meta-impy-04f9d0b7cef929ad9acdea37bf5f826850993c52.tar.bz2 meta-impy-04f9d0b7cef929ad9acdea37bf5f826850993c52.tar.xz |
Second Life viewer sources 1.21.4-RC
Diffstat (limited to 'linden/indra/newview/llconsole.cpp')
-rw-r--r-- | linden/indra/newview/llconsole.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/linden/indra/newview/llconsole.cpp b/linden/indra/newview/llconsole.cpp index 58cda1c..3ee11ff 100644 --- a/linden/indra/newview/llconsole.cpp +++ b/linden/indra/newview/llconsole.cpp | |||
@@ -334,22 +334,21 @@ void LLConsole::Paragraph::updateLines(F32 screen_width, LLFontGL* font, bool fo | |||
334 | // Wrap lines that are longer than the view is wide. | 334 | // Wrap lines that are longer than the view is wide. |
335 | while( paragraph_offset < (S32)mParagraphText.length() ) | 335 | while( paragraph_offset < (S32)mParagraphText.length() ) |
336 | { | 336 | { |
337 | S32 skip_newline_chars; // skip '\n' | 337 | bool found_newline = false; // skip '\n' |
338 | // Figure out if a word-wrapped line fits here. | 338 | // Figure out if a word-wrapped line fits here. |
339 | LLWString::size_type line_end = mParagraphText.find_first_of(llwchar('\n'), paragraph_offset); | 339 | LLWString::size_type line_end = mParagraphText.find_first_of(llwchar('\n'), paragraph_offset); |
340 | if (line_end != LLWString::npos) | 340 | if (line_end != LLWString::npos) |
341 | { | 341 | { |
342 | skip_newline_chars = 1; // skip '\n' | 342 | found_newline = true; // skip '\n' |
343 | } | 343 | } |
344 | else | 344 | else |
345 | { | 345 | { |
346 | line_end = mParagraphText.size(); | 346 | line_end = mParagraphText.size(); |
347 | skip_newline_chars = 0; | ||
348 | } | 347 | } |
349 | 348 | ||
350 | U32 drawable = font->maxDrawableChars(mParagraphText.c_str()+paragraph_offset, screen_width, line_end - paragraph_offset, TRUE); | 349 | U32 drawable = font->maxDrawableChars(mParagraphText.c_str()+paragraph_offset, screen_width, line_end - paragraph_offset, TRUE); |
351 | 350 | ||
352 | if (drawable != 0) | 351 | if (drawable != 0 || found_newline) |
353 | { | 352 | { |
354 | F32 x_position = 0; //Screen X position of text. | 353 | F32 x_position = 0; //Screen X position of text. |
355 | 354 | ||
@@ -394,10 +393,10 @@ void LLConsole::Paragraph::updateLines(F32 screen_width, LLFontGL* font, bool fo | |||
394 | } | 393 | } |
395 | else | 394 | else |
396 | { | 395 | { |
397 | if( !skip_newline_chars ) | 396 | break; // Nothing more to print |
398 | break; // Nothing more to print | ||
399 | } | 397 | } |
400 | paragraph_offset += (drawable + skip_newline_chars); | 398 | |
399 | paragraph_offset += (drawable + ( found_newline ? 1 : 0 ) ); | ||
401 | } | 400 | } |
402 | } | 401 | } |
403 | 402 | ||