diff options
Diffstat (limited to 'indra')
| -rwxr-xr-x | indra/llui/lltexteditor.cpp | 15 | 
1 files changed, 12 insertions, 3 deletions
| diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 3a546d041a..49e1991b01 100755 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -1308,13 +1308,22 @@ BOOL LLTextEditor::handleNavigationKey(const KEY key, const MASK mask)  		case KEY_END:  			endOfLine(); -			if (!mDrawRightmostCursor)  			{ -				mDrawRightmostCursor = true; -				if (mCursorPos + 1 < getLength()) +				S32 last_line_index = mLineInfoList.size() - 1; +				if (getLineNumFromDocIndex(mCursorPos, true) < last_line_index)  				{ +					mDrawRightmostCursor = true;  					setCursorPos(mCursorPos + 1);  				} +				else if (last_line_index > 0) // only for two and more lines +				{ +					S32 prev_line_width = mLineInfoList[last_line_index - 1].mRect.getWidth(); +					S32 last_line_width = mLineInfoList[last_line_index].mRect.getWidth(); +					if (prev_line_width <= last_line_width) +					{ +						mDrawRightmostCursor = true; +					} +				}  			}  			break; | 
