From 272e6050eb2b456aacc2f1ef1f95284172f459db Mon Sep 17 00:00:00 2001 From: ziree Date: Mon, 13 Feb 2012 16:39:43 +0100 Subject: [PATCH] Fixed line editor history or nearby chat, broken by my previous commit. --- indra/newview/llnearbychatcontrol.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/indra/newview/llnearbychatcontrol.cpp b/indra/newview/llnearbychatcontrol.cpp index 639a07da5f..935233380d 100644 --- a/indra/newview/llnearbychatcontrol.cpp +++ b/indra/newview/llnearbychatcontrol.cpp @@ -251,6 +251,7 @@ BOOL LLNearbyChatControl::handleKeyHere(KEY key, MASK mask ) // autohide the chat bar if escape key was pressed and we're the default chat bar if(key==KEY_ESCAPE && mask==MASK_NONE) { + // we let ESC key go through to the rest of the UI code, so don't set handled=TRUE autohide(); gAgent.stopTyping(); } @@ -285,12 +286,17 @@ BOOL LLNearbyChatControl::handleKeyHere(KEY key, MASK mask ) if (handled == TRUE) { + // save current line in the history buffer + LLLineEditor::onCommit(); + + // send chat to nearby chat hub LLNearbyChat::instance().sendChat(getConvertedText(),type); + setText(LLStringExplicit("")); autohide(); return TRUE; } - // let ESC key go through to the rest of the UI code + // let the line editor handle everything we don't handle return LLLineEditor::handleKeyHere(key,mask); }