Add home and end keys for command prompt, from Matthias Lederhofer.

This commit is contained in:
Nicholas Marriott 2011-12-01 20:44:12 +00:00
parent 2397083f7e
commit 31f13e49d8

View File

@ -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 }
};