diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llchatbar.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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 ) | |||
215 | { | 215 | { |
216 | if (mInputEditor) | 216 | if (mInputEditor) |
217 | { | 217 | { |
218 | std::string txt(mInputEditor->getText()); | ||
219 | |||
218 | std::vector<LLUUID> avatar_ids; | 220 | std::vector<LLUUID> avatar_ids; |
219 | std::vector<LLVector3d> positions; | 221 | std::vector<LLVector3d> positions; |
220 | LLWorld::getInstance()->getAvatars(&avatar_ids, &positions); | 222 | LLWorld::getInstance()->getAvatars(&avatar_ids, &positions); |
221 | 223 | ||
222 | if (!avatar_ids.empty()) | 224 | if (!avatar_ids.empty() && !txt.empty()) |
223 | { | 225 | { |
224 | mInputEditor->deleteSelection(); // Clean up prev completion before attempting a new one | 226 | mInputEditor->deleteSelection(); // Clean up prev completion before attempting a new one |
225 | 227 | ||
226 | S32 cursorPos = mInputEditor->getCursor(); | 228 | S32 cursorPos = mInputEditor->getCursor(); |
227 | std::string txt(mInputEditor->getText()); | ||
228 | 229 | ||
229 | if (mCompletionHolder.last_txt != mInputEditor->getText()) | 230 | if (mCompletionHolder.last_txt != mInputEditor->getText()) |
230 | { | 231 | { |