summaryrefslogtreecommitdiff
path: root/src/input_handler.cc
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2016-12-14 00:28:46 +0000
committerMaxime Coste <mawww@kakoune.org>2016-12-14 00:28:46 +0000
commit735b1e1dc51d5d565ec4dd5aca88d013ee5c88c8 (patch)
treed59efd49e75499920df18a01ca8ea1a8b5564cff /src/input_handler.cc
parent4d5a4fb6ddcc78b4622c0b7c089d39bbc90e5c50 (diff)
Add support for readline like <c-k> and <c-u> in prompts
Diffstat (limited to 'src/input_handler.cc')
-rw-r--r--src/input_handler.cc7
1 files changed, 7 insertions, 0 deletions
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<Word>(m_cursor_pos, m_line);
else if (key == ctrlalt('e'))
to_next_word_end<WORD>(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);
}