projects
/
oweals
/
minetest.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix build with redis
[oweals/minetest.git]
/
src
/
chat.cpp
diff --git
a/src/chat.cpp
b/src/chat.cpp
index 1135ccdf7486be295043e659a1d0685edcd241ea..0466b6e263e082929e959fa39d1b5277847997dd 100644
(file)
--- a/
src/chat.cpp
+++ b/
src/chat.cpp
@@
-19,7
+19,7
@@
with this program; if not, write to the Free Software Foundation, Inc.,
#include "chat.h"
#include "debug.h"
#include "chat.h"
#include "debug.h"
-#include
<cassert>
+#include
"strfnd.h"
#include <cctype>
#include <sstream>
#include "util/string.h"
#include <cctype>
#include <sstream>
#include "util/string.h"
@@
-151,7
+151,7
@@
void ChatBuffer::reformat(u32 cols, u32 rows)
}
else if (cols != m_cols || rows != m_rows)
{
}
else if (cols != m_cols || rows != m_rows)
{
- // TODO: Avoid reformatting ALL lines (even in
ivis
ble ones)
+ // TODO: Avoid reformatting ALL lines (even in
visi
ble ones)
// each time the console size changes.
// Find out the scroll position in *unformatted* lines
// each time the console size changes.
// Find out the scroll position in *unformatted* lines
@@
-464,7
+464,7
@@
void ChatPrompt::historyNext()
}
}
}
}
-void ChatPrompt::nickCompletion(const std::list<std::
w
string>& 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
{
// 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;
// find all names that start with the selected prefix
std::vector<std::wstring> completions;
- for (std::list<std::
w
string>::const_iterator
+ for (std::list<std::string>::const_iterator
i = names.begin();
i != names.end(); ++i)
{
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);
if (prefix_start == 0)
completion += L":";
completions.push_back(completion);