From 2e339e92bb6f2a8dfc52b3c55b76aa1631babdf0 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 4 Sep 2012 00:07:13 +0200 Subject: [PATCH] Allow arrow keys in prompt mode --- src/client.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/client.cc b/src/client.cc index c48aca25..f8c92e61 100644 --- a/src/client.cc +++ b/src/client.cc @@ -152,7 +152,8 @@ public: m_client.reset_normal_mode(); return; } - else if (key == Key(Key::Modifiers::Control, 'p')) + else if (key == Key(Key::Modifiers::Control, 'p') or + key == Key(Key::Modifiers::Control, 'c')) { if (m_history_it != history.begin()) { @@ -163,7 +164,8 @@ public: m_cursor_pos = m_result.length(); } } - else if (key == Key(Key::Modifiers::Control, 'n')) + else if (key == Key(Key::Modifiers::Control, 'n') or + key == Key(Key::Modifiers::Control, 'b')) { if (m_history_it != history.end()) { @@ -175,12 +177,12 @@ public: m_cursor_pos = m_result.length(); } } - else if (key == Key(Key::Modifiers::Control, 'b')) + else if (key == Key(Key::Modifiers::Control, 'd')) { if (m_cursor_pos > 0) --m_cursor_pos; } - else if (key == Key(Key::Modifiers::Control, 'f')) + else if (key == Key(Key::Modifiers::Control, 'e')) { if (m_cursor_pos < m_result.length()) ++m_cursor_pos;