From d871f00ecedddd0a8d67c143d80c5b32a80d5b62 Mon Sep 17 00:00:00 2001 From: elektrahesse Date: Fri, 17 Sep 2010 19:34:41 +0200 Subject: Added a check to avoid triggering completion tests if text in chatbar is empty. --- linden/indra/newview/llchatbar.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/llchatbar.cpp b/linden/indra/newview/llchatbar.cpp index 2981958..eaa8cc8 100644 --- a/linden/indra/newview/llchatbar.cpp +++ b/linden/indra/newview/llchatbar.cpp @@ -215,16 +215,17 @@ BOOL LLChatBar::handleKeyHere( KEY key, MASK mask ) { if (mInputEditor) { + std::string txt(mInputEditor->getText()); + std::vector avatar_ids; std::vector positions; LLWorld::getInstance()->getAvatars(&avatar_ids, &positions); - if (!avatar_ids.empty()) + if (!avatar_ids.empty() && !txt.empty()) { mInputEditor->deleteSelection(); // Clean up prev completion before attempting a new one S32 cursorPos = mInputEditor->getCursor(); - std::string txt(mInputEditor->getText()); if (mCompletionHolder.last_txt != mInputEditor->getText()) { -- cgit v1.1