From 735b1e1dc51d5d565ec4dd5aca88d013ee5c88c8 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 14 Dec 2016 00:28:46 +0000 Subject: [PATCH] Add support for readline like and in prompts --- src/input_handler.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/input_handler.cc b/src/input_handler.cc index 7d3ce050..e9c6542d 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -425,6 +425,13 @@ public: to_next_word_end(m_cursor_pos, m_line); else if (key == ctrlalt('e')) to_next_word_end(m_cursor_pos, m_line); + else if (key == ctrl('k')) + m_line = m_line.substr(0_char, m_cursor_pos).str(); + else if (key == ctrl('u')) + { + m_line = m_line.substr(m_cursor_pos).str(); + m_cursor_pos = 0; + } else if (auto cp = key.codepoint()) insert(*cp); }