summaryrefslogtreecommitdiff
path: root/src/input_handler.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2013-02-19 13:50:27 +0100
committerMaxime Coste <frrrwww@gmail.com>2013-02-19 13:50:27 +0100
commita453ddaf374fabf1fa9942a9d0df0d4a999ac79a (patch)
treef7f01339178dc838df102c36c47ac6c0c3a27538 /src/input_handler.cc
parentb08749285e76d77ebdab4ea1c56092438d953ff9 (diff)
Add support for Home/End key in prompts
Diffstat (limited to 'src/input_handler.cc')
-rw-r--r--src/input_handler.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/input_handler.cc b/src/input_handler.cc
index 88f986ba..be4aa51f 100644
--- a/src/input_handler.cc
+++ b/src/input_handler.cc
@@ -95,6 +95,10 @@ public:
if (m_cursor_pos < m_line.char_length())
++m_cursor_pos;
}
+ else if (key == Key::Home)
+ m_cursor_pos = 0;
+ else if (key == Key::End)
+ m_cursor_pos = m_line.char_length();
else if (key == Key::Backspace)
{
if (m_cursor_pos != 0)