From e93ce58b0dec4d6ab4ac03e137d2e37c161eeb9c Mon Sep 17 00:00:00 2001 From: salad Date: Wed, 7 Oct 2020 14:59:18 +0200 Subject: qsd --- src/c_input.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'src/c_input.c') diff --git a/src/c_input.c b/src/c_input.c index 7eb8084..1c14342 100644 --- a/src/c_input.c +++ b/src/c_input.c @@ -16,6 +16,7 @@ #include #include "c_init.h" +#include "c_keys.h" #include "c_input.h" #include "c_utils.h" #include "m_prompt.h" @@ -79,24 +80,11 @@ int16_t uint32_t plen, t_caps *tcaps) { - int32_t pos; - - pos = -1; if (tcaps->cpos >= 1) { - if (((tcaps->cpos + plen) % (tcaps->ws.ws_col)) == 0) - { - tputs(tgetstr("up", NULL), 1, ft_putchar); - while(++pos <= (tcaps->ws.ws_col)) - tputs(tgetstr("nd", NULL), 1, ft_putchar); - } - else - { - tputs(tgetstr("le", NULL), 1, ft_putchar); - } - tputs(tgetstr("dc", NULL), 1, ft_putchar); *line = c_delchar(*line, tcaps->cpos); - tcaps->cpos--; + c_key_left(plen, tcaps); + tputs(tgetstr("cd", NULL), 1, ft_putchar); } return (1); } -- cgit v1.2.3