diff options
author | PilzAdam <pilzadam@minetest.net> | 2013-03-25 19:13:25 +0100 |
---|---|---|
committer | PilzAdam <pilzadam@minetest.net> | 2013-04-05 02:31:58 +0200 |
commit | b0e68060777dfb7daefc81c169e1ed4d95c4a2d6 (patch) | |
tree | 7ea5797cc99b7dfb3c989669c3f97d88e6628d59 /src/chat.cpp | |
parent | 76b86c036876faabe49e274e9ada4fb9d8bd6aea (diff) | |
download | minetest-b0e68060777dfb7daefc81c169e1ed4d95c4a2d6.tar.gz minetest-b0e68060777dfb7daefc81c169e1ed4d95c4a2d6.tar.bz2 minetest-b0e68060777dfb7daefc81c169e1ed4d95c4a2d6.zip |
Fix nick completion
Diffstat (limited to 'src/chat.cpp')
-rw-r--r-- | src/chat.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/chat.cpp b/src/chat.cpp index 1135ccdf7..3102e194a 100644 --- a/src/chat.cpp +++ b/src/chat.cpp @@ -464,7 +464,7 @@ void ChatPrompt::historyNext() } } -void ChatPrompt::nickCompletion(const std::list<std::wstring>& names, bool backwards) +void ChatPrompt::nickCompletion(const std::list<std::string>& names, bool backwards) { // Two cases: // (a) m_nick_completion_start == m_nick_completion_end == 0 @@ -493,13 +493,13 @@ void ChatPrompt::nickCompletion(const std::list<std::wstring>& names, bool backw // find all names that start with the selected prefix std::vector<std::wstring> completions; - for (std::list<std::wstring>::const_iterator + for (std::list<std::string>::const_iterator i = names.begin(); i != names.end(); ++i) { - if (str_starts_with(*i, prefix, true)) + if (str_starts_with(narrow_to_wide(*i), prefix, true)) { - std::wstring completion = *i; + std::wstring completion = narrow_to_wide(*i); if (prefix_start == 0) completion += L":"; completions.push_back(completion); |