From daefd0ab367605eabe1a293dd7f6a50964bb3801 Mon Sep 17 00:00:00 2001 From: Kahrl Date: Fri, 19 Sep 2014 22:26:38 +0200 Subject: Add paste command (Ctrl-V) in GUIChatConsole --- src/chat.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/chat.cpp') diff --git a/src/chat.cpp b/src/chat.cpp index 0466b6e26..b78b90145 100644 --- a/src/chat.cpp +++ b/src/chat.cpp @@ -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; -- cgit v1.2.3