From 2b766040a9a5684aa71757a0ad96fb37b5333e09 Mon Sep 17 00:00:00 2001 From: nobody Date: Sat, 22 May 2021 23:20:32 +0800 Subject: Make Home/End keys work as expected in text input mode Signed-off-by: Lukas Fleischer --- src/getstring.c | 2 ++ 1 file changed, 2 insertions(+) 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 */ -- cgit v1.2.3-70-g09d2