summaryrefslogtreecommitdiff
path: root/src/gui/chat.cpp
diff options
context:
space:
mode:
authorBlue Sans Douze <bluesansdouze@gmail.com>2010-01-24 15:35:23 +0100
committerBlue Sans Douze <bluesansdouze@gmail.com>2010-01-24 15:35:23 +0100
commitbee1477e6f7c029c94c1c0e119e4529d3a55ecda (patch)
tree53d711449b8ead59d2d07b64fd72b96e86948372 /src/gui/chat.cpp
parentfd92eb89fffd8e33f34766c338900b39ae3d176a (diff)
downloadmana-client-bee1477e6f7c029c94c1c0e119e4529d3a55ecda.tar.gz
mana-client-bee1477e6f7c029c94c1c0e119e4529d3a55ecda.tar.bz2
mana-client-bee1477e6f7c029c94c1c0e119e4529d3a55ecda.tar.xz
mana-client-bee1477e6f7c029c94c1c0e119e4529d3a55ecda.zip
Autocomplete names with quotes if the string begins with a / or @ (commands)
Diffstat (limited to 'src/gui/chat.cpp')
-rw-r--r--src/gui/chat.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp
index ada7ab16..b7c02283 100644
--- a/src/gui/chat.cpp
+++ b/src/gui/chat.cpp
@@ -548,6 +548,9 @@ void ChatWindow::autoComplete()
if (newName != "")
{
+ if(inputText[0] == '@' || inputText[0] == '/')
+ newName = "\"" + newName + "\"";
+
mChatInput->setText(inputText.substr(0, startName) + newName
+ inputText.substr(caretPos, inputText.length() - caretPos));