summaryrefslogtreecommitdiffstats
path: root/src/c_input.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/c_input.c')
-rw-r--r--src/c_input.c18
1 files changed, 3 insertions, 15 deletions
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 <signal.h>
#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);
}