MAINT-3967 FIXED Up arrow key does not move the cursor up in chat field.

meow-7.2.2
maksymsproductengine 2014-06-18 20:23:34 +03:00
parent 24ebc86b41
commit f8627d4342
1 changed files with 12 additions and 3 deletions

View File

@ -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;