From 74f74da3cf43e990bffb186a8e2e9c4104bd07da Mon Sep 17 00:00:00 2001 From: James Cook Date: Thu, 5 Nov 2009 14:17:53 -0800 Subject: Only use ctrl-up/down for recently typed chat lines if chat field is empty. Otherwise it discards a typed line in progress. --- indra/newview/llviewerwindow.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra') 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) { -- cgit v1.2.3