+ m_line.insert(m_cursor, str);
+ m_cursor += str.size();
+ clampView();
+ m_nick_completion_start = 0;
+ m_nick_completion_end = 0;
+}
+
+void ChatPrompt::addToHistory(const std::wstring &line)
+{
+ if (!line.empty() &&
+ (m_history.size() == 0 || m_history.back() != line)) {
+ // Remove all duplicates
+ m_history.erase(std::remove(m_history.begin(), m_history.end(),
+ line), m_history.end());
+ // Push unique line