aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobody <nobody@example.net>2021-05-22 23:20:32 +0800
committerLukas Fleischer <lfleischer@calcurse.org>2021-08-07 13:52:53 -0400
commit2b766040a9a5684aa71757a0ad96fb37b5333e09 (patch)
treeea1712de67f6ff391cb17190701f421e591517db
parentee8ebebf9210abaa7bb6e9accc3ceed3909c2f12 (diff)
downloadcalcurse-pu.tar.gz
calcurse-pu.zip
Make Home/End keys work as expected in text input modepu
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
-rw-r--r--src/getstring.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/getstring.c b/src/getstring.c
index 7cdb84e..74c251e 100644
--- a/src/getstring.c
+++ b/src/getstring.c
@@ -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 */