From a453ddaf374fabf1fa9942a9d0df0d4a999ac79a Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 19 Feb 2013 13:50:27 +0100 Subject: Add support for Home/End key in prompts --- src/input_handler.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/input_handler.cc') 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) -- cgit v1.2.3