From 31f13e49d8534c893590e0a1e1fbcae1adf03d02 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 1 Dec 2011 20:44:12 +0000 Subject: [PATCH] Add home and end keys for command prompt, from Matthias Lederhofer. --- mode-key.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mode-key.c b/mode-key.c index f15bbe12..95b4c232 100644 --- a/mode-key.c +++ b/mode-key.c @@ -141,6 +141,8 @@ const struct mode_key_entry mode_key_vi_edit[] = { { KEYC_LEFT, 0, MODEKEYEDIT_CURSORLEFT }, { KEYC_RIGHT, 0, MODEKEYEDIT_CURSORRIGHT }, { KEYC_UP, 0, MODEKEYEDIT_HISTORYUP }, + { KEYC_HOME, 0, MODEKEYEDIT_STARTOFLINE }, + { KEYC_END, 0, MODEKEYEDIT_ENDOFLINE }, { '$', 1, MODEKEYEDIT_ENDOFLINE }, { '0', 1, MODEKEYEDIT_STARTOFLINE }, @@ -289,6 +291,8 @@ const struct mode_key_entry mode_key_emacs_edit[] = { { KEYC_LEFT, 0, MODEKEYEDIT_CURSORLEFT }, { KEYC_RIGHT, 0, MODEKEYEDIT_CURSORRIGHT }, { KEYC_UP, 0, MODEKEYEDIT_HISTORYUP }, + { KEYC_HOME, 0, MODEKEYEDIT_STARTOFLINE }, + { KEYC_END, 0, MODEKEYEDIT_ENDOFLINE }, { 0, -1, 0 } };