Make Home/End keys work as expected in text input mode

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
nobody 2021-05-22 23:20:32 +08:00 committed by Lukas Fleischer
parent ee8ebebf92
commit 2b766040a9

View File

@ -241,9 +241,11 @@ enum getstr getstring(WINDOW * win, char *str, int l, int x, int y)
st.len = st.pos;
break;
case CTRL('A'): /* go to beginning of string */
case KEY_HOME:
st.pos = 0;
break;
case CTRL('E'): /* go to end of string */
case KEY_END:
st.pos = st.len;
break;
case KEY_LEFT: /* move one char backward */