summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-11-05 14:17:53 -0800
committerJames Cook <james@lindenlab.com>2009-11-05 14:17:53 -0800
commit74f74da3cf43e990bffb186a8e2e9c4104bd07da (patch)
tree44bca26012fe2682dd8ae7b638e67a37cb25e5f8
parentef30dfd5913e2509cdefbedf1517c83471b38184 (diff)
Only use ctrl-up/down for recently typed chat lines if chat field is empty.
Otherwise it discards a typed line in progress.
-rw-r--r--indra/newview/llviewerwindow.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 765f4e4476..9b3dbcd2f6 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2113,14 +2113,14 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
// arrow keys move avatar while chatting hack
if (chat_editor && chat_editor->hasFocus())
{
- // let Control-Up and Control-Down through for chat line history
- if (!(key == KEY_UP && mask == MASK_CONTROL)
- && !(key == KEY_DOWN && mask == MASK_CONTROL))
+ // If text field is empty, there's no point in trying to move
+ // cursor with arrow keys, so allow movement
+ if (chat_editor->getText().empty()
+ || gSavedSettings.getBOOL("ArrowKeysAlwaysMove"))
{
- // If text field is empty, there's no point in trying to move
- // cursor with arrow keys, so allow movement
- if (chat_editor->getText().empty()
- || gSavedSettings.getBOOL("ArrowKeysAlwaysMove"))
+ // let Control-Up and Control-Down through for chat line history,
+ if (!(key == KEY_UP && mask == MASK_CONTROL)
+ && !(key == KEY_DOWN && mask == MASK_CONTROL))
{
switch(key)
{