Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions indra/llui/lllineeditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,9 @@ LLLineEditor::LLLineEditor(const LLLineEditor::Params& p)

// clamp text padding to current editor size
updateTextPadding();
setCursor(mText.length());

// read-only fields anchor to start, editable ones to end of initial text
setCursor(mReadOnly ? 0 : mText.length());

if (mSpellCheck)
{
Expand Down Expand Up @@ -454,7 +456,16 @@ void LLLineEditor::setText(const LLStringExplicit &new_text, bool use_size_limit
// try to preserve insertion point, but deselect text
deselect();
}
setCursor(llmin((S32)mText.length(), getCursor()));

if (mReadOnly)
{
// display field, anchor to start so the value isn't scrolled off
setCursor(0);
}
else
{
setCursor(llmin((S32)mText.length(), getCursor()));
}

// Set current history line to end of history.
if (mLineHistory.empty())
Expand Down