]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/chat.cpp
Mgv7 mountains: Remove divide by zero code that creates vast walls
[dragonfireclient.git] / src / chat.cpp
index 0466b6e263e082929e959fa39d1b5277847997dd..1fb872b8527badb4d5fa4ae1696601b84c7d5970 100644 (file)
@@ -407,6 +407,15 @@ void ChatPrompt::input(wchar_t ch)
        m_nick_completion_end = 0;
 }
 
+void ChatPrompt::input(const std::wstring &str)
+{
+       m_line.insert(m_cursor, str);
+       m_cursor += str.size();
+       clampView();
+       m_nick_completion_start = 0;
+       m_nick_completion_end = 0;
+}
+
 std::wstring ChatPrompt::submit()
 {
        std::wstring line = m_line;
@@ -765,5 +774,5 @@ void ChatBackend::scrollPageDown()
 
 void ChatBackend::scrollPageUp()
 {
-       m_console_buffer.scroll(-m_console_buffer.getRows());
+       m_console_buffer.scroll(-(s32)m_console_buffer.getRows());
 }