summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/terminal_ui.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/terminal_ui.cc b/src/terminal_ui.cc
index 13a8af4b..d411dd67 100644
--- a/src/terminal_ui.cc
+++ b/src/terminal_ui.cc
@@ -971,7 +971,15 @@ Optional<Key> TerminalUI::get_next_key()
if (m_paste_buffer)
{
- m_paste_buffer->push_back(*c);
+ auto paste_convert = [](char c) {
+ switch (c)
+ {
+ case '\r': return '\n';
+ default: return c;
+ }
+ };
+
+ m_paste_buffer->push_back(paste_convert(*c));
return Key{Key::Invalid};
}
return parse_key(*c);