summaryrefslogtreecommitdiff
path: root/indra/llui/lltextbase.cpp
diff options
context:
space:
mode:
authorDave Houlton <euclid@lindenlab.com>2020-09-22 22:22:21 +0000
committerDave Houlton <euclid@lindenlab.com>2020-09-22 22:22:21 +0000
commit364ba9978b42ca03c39ee63c23fc1378e410ca96 (patch)
treea5ebd2bd8a4d6e87f55d1be6f278b1807b53de0f /indra/llui/lltextbase.cpp
parentb62d7c2f06fdaa91312fd6857d03748defe8b60f (diff)
parent86e7cc3d35e41a88b25175bafb5687e1864423d9 (diff)
Merged in DV497-merge-6.4.9 (pull request #312)
Merge 6.4.9 into DRTVWR-497
Diffstat (limited to 'indra/llui/lltextbase.cpp')
-rw-r--r--indra/llui/lltextbase.cpp33
1 files changed, 32 insertions, 1 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 83b851eed2..30bf938591 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -1017,7 +1017,38 @@ BOOL LLTextBase::handleMouseDown(S32 x, S32 y, MASK mask)
// handle triple click
if (!mTripleClickTimer.hasExpired())
{
- selectAll();
+ S32 real_line = getLineNumFromDocIndex(mCursorPos, false);
+ S32 line_start = -1;
+ S32 line_end = -1;
+ for (line_list_t::const_iterator it = mLineInfoList.begin(), end_it = mLineInfoList.end();
+ it != end_it;
+ ++it)
+ {
+ if (it->mLineNum < real_line)
+ {
+ continue;
+ }
+ if (it->mLineNum > real_line)
+ {
+ break;
+ }
+ if (line_start == -1)
+ {
+ line_start = it->mDocIndexStart;
+ }
+ line_end = it->mDocIndexEnd;
+ line_end = llclamp(line_end, 0, getLength());
+ }
+
+ if (line_start == -1)
+ {
+ return TRUE;
+ }
+
+ mSelectionEnd = line_start;
+ mSelectionStart = line_end;
+ setCursorPos(line_start);
+
return TRUE;
}