summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authormaksymsproductengine <maksymsproductengine@lindenlab.com>2014-06-18 20:23:34 +0300
committermaksymsproductengine <maksymsproductengine@lindenlab.com>2014-06-18 20:23:34 +0300
commitf8627d43423d6e2383b13dfa98e26849a51ce39a (patch)
tree79a0a01bce1d4bb9e70864f47fdfe577bae4ed61 /indra
parent24ebc86b4132284113de57b979ded76ce47dce1c (diff)
MAINT-3967 FIXED Up arrow key does not move the cursor up in chat field.
Diffstat (limited to 'indra')
-rwxr-xr-xindra/llui/lltexteditor.cpp15
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;