aboutsummaryrefslogtreecommitdiff
path: root/src/chat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/chat.cpp')
-rw-r--r--src/chat.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/chat.cpp b/src/chat.cpp
index c3ed59804..c9317a079 100644
--- a/src/chat.cpp
+++ b/src/chat.cpp
@@ -123,14 +123,14 @@ void ChatBuffer::deleteByAge(f32 maxAge)
deleteOldest(count);
}
-u32 ChatBuffer::getColumns() const
+u32 ChatBuffer::getRows() const
{
- return m_cols;
+ return m_rows;
}
-u32 ChatBuffer::getRows() const
+void ChatBuffer::scrollTop()
{
- return m_rows;
+ m_scroll = getTopScrollPos();
}
void ChatBuffer::reformat(u32 cols, u32 rows)
@@ -220,11 +220,6 @@ void ChatBuffer::scrollBottom()
m_scroll = getBottomScrollPos();
}
-void ChatBuffer::scrollTop()
-{
- m_scroll = getTopScrollPos();
-}
-
u32 ChatBuffer::formatChatLine(const ChatLine& line, u32 cols,
std::vector<ChatFormattedLine>& destination) const
{
@@ -490,8 +485,8 @@ void ChatPrompt::nickCompletion(const std::list<std::string>& names, bool backwa
// find all names that start with the selected prefix
std::vector<std::wstring> completions;
for (const std::string &name : names) {
- if (str_starts_with(narrow_to_wide(name), prefix, true)) {
- std::wstring completion = narrow_to_wide(name);
+ std::wstring completion = utf8_to_wide(name);
+ if (str_starts_with(completion, prefix, true)) {
if (prefix_start == 0)
completion += L": ";
completions.push_back(completion);