From b0e68060777dfb7daefc81c169e1ed4d95c4a2d6 Mon Sep 17 00:00:00 2001 From: PilzAdam Date: Mon, 25 Mar 2013 19:13:25 +0100 Subject: Fix nick completion --- src/chat.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/chat.cpp') 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& names, bool backwards) +void ChatPrompt::nickCompletion(const std::list& 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& names, bool backw // find all names that start with the selected prefix std::vector completions; - for (std::list::const_iterator + for (std::list::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); -- cgit v1.2.3