diff options
author | Kitty Barnett <develop@catznip.com> | 2012-06-11 13:39:45 +0200 |
---|---|---|
committer | Kitty Barnett <develop@catznip.com> | 2012-06-11 13:39:45 +0200 |
commit | 80b1a2c0a8f7b4444dc1588ba5f71bbb69b40acd (patch) | |
tree | 7a3ddc6e57559e429d726bba2c490352c98d3a06 /indra/llui/lltexteditor.cpp | |
parent | 20210455f5a350b3e8e24515ba7af71db0eece0b (diff) |
STORM-276 Insert braces around if/for/while loops
Diffstat (limited to 'indra/llui/lltexteditor.cpp')
-rw-r--r-- | indra/llui/lltexteditor.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index b860f0b44f..144b6960a1 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -1960,9 +1960,13 @@ void LLTextEditor::showContextMenu(S32 x, S32 y) if (hasSelection()) { if ( (mCursorPos < llmin(mSelectionStart, mSelectionEnd)) || (mCursorPos > llmax(mSelectionStart, mSelectionEnd)) ) + { deselect(); + } else + { setCursorPos(llmax(mSelectionStart, mSelectionEnd)); + } } bool use_spellcheck = getSpellCheck(), is_misspelled = false; |