From f9671485f8049fbc6909cc757eae851ac1b5e3b9 Mon Sep 17 00:00:00 2001 From: salad Date: Fri, 11 Sep 2020 14:29:48 +0200 Subject: home works, not END. lets go for a bit of norming --- src/c_init.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/c_init.c') diff --git a/src/c_init.c b/src/c_init.c index 8974007..3829a78 100644 --- a/src/c_init.c +++ b/src/c_init.c @@ -119,10 +119,18 @@ int16_t { return (c_key_right(ft_strlen(line), tcaps)); } - else if (strncmp(buf, tcaps->CL, ft_strlen(tgetstr("kb", NULL))) == 0) + else if (strncmp(buf, tcaps->CL, 4) == 0) { return (c_ctrl_l(line, tcaps, msh)); } + else if (strncmp(buf, tcaps->HM, 4) == 0) + { + return (c_home_key(tcaps)); + } + else if (strncmp(buf, tcaps->ND, 4) == 0) + { + return (c_end_key(ft_strlen(line), tcaps)); + } else if (strncmp(buf, tgetstr("kb", NULL), ft_strlen(tgetstr("kb", NULL))) == 0) { return (c_back_slash(&line, tcaps)); -- cgit v1.2.3