diff options
Diffstat (limited to 'src/c_init.c')
-rw-r--r-- | src/c_init.c | 9 |
1 files changed, 6 insertions, 3 deletions
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); |