From 214eae8a55bde34ca412084bebdb378a696152cc Mon Sep 17 00:00:00 2001 From: joe Date: Tue, 1 Dec 2020 16:12:02 +0100 Subject: Bav --- src/c_init.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/c_init.c') diff --git a/src/c_init.c b/src/c_init.c index 1ab6743..965af3f 100644 --- a/src/c_init.c +++ b/src/c_init.c @@ -89,9 +89,6 @@ static short return (c_end_key(ft_strlen(line), tcaps->plen, tcaps)); else if ((*((unsigned int *)buf)) == CTRL_L) return (c_ctrl_l(line, tcaps, msh)); - else if (((*((unsigned int *)buf)) == UP_K) || - ((*((unsigned int *)buf)) == CTRL_P)) - return (c_key_up(tcaps, msh)); else if ((*((unsigned int *)buf)) == CTRL_D && line[0] == '\0') { @@ -120,6 +117,12 @@ static char return (NULL); if (ft_isprint(buf[0])) c_add_char(&line, buf, tcaps, msh); + else if (((*((unsigned int *)buf)) == UP_K) || + ((*((unsigned int *)buf)) == CTRL_P)) + { + c_key_up(&line, tcaps, msh); + c_redraw_line(line, tcaps, msh); + } else if ((*((unsigned int *)buf)) == DEL_K) { c_back_slash(&line, tcaps->plen, tcaps); -- cgit v1.2.3