summaryrefslogtreecommitdiffstats
path: root/src/c_input.c
diff options
context:
space:
mode:
authorsalad <fmoenne-@student.le-101.fr>2020-09-11 14:29:48 +0200
committersalad <fmoenne-@student.le-101.fr>2020-09-11 14:29:48 +0200
commitf9671485f8049fbc6909cc757eae851ac1b5e3b9 (patch)
tree1c1b8074f9478f34642487b929bedff093394636 /src/c_input.c
parentremove perruches (diff)
download42-minishell-f9671485f8049fbc6909cc757eae851ac1b5e3b9.tar.gz
42-minishell-f9671485f8049fbc6909cc757eae851ac1b5e3b9.tar.bz2
42-minishell-f9671485f8049fbc6909cc757eae851ac1b5e3b9.tar.xz
42-minishell-f9671485f8049fbc6909cc757eae851ac1b5e3b9.tar.zst
42-minishell-f9671485f8049fbc6909cc757eae851ac1b5e3b9.zip
home works, not END. lets go for a bit of norming
Diffstat (limited to '')
-rw-r--r--src/c_input.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/c_input.c b/src/c_input.c
index f92a784..2435e4a 100644
--- a/src/c_input.c
+++ b/src/c_input.c
@@ -59,11 +59,43 @@ int16_t
t_msh *msh)
{
tputs(tgetstr("cl", NULL), 1, ft_putchar);
+ m_prompt_psx(1, msh);
c_redraw_line(line, tcaps->cpos, msh);
return (1);
}
int16_t
+ c_home_key(t_caps *tcaps)
+{
+ uint16_t i;
+
+ i = tcaps->cpos;
+ while (i > 0)
+ {
+ tputs(tgetstr("le", NULL), 1, ft_putchar);
+ i--;
+ }
+ tcaps->cpos = 0;
+ return (1);
+}
+
+int16_t
+ c_end_key(uint16_t size, t_caps *tcaps)
+{
+ uint16_t i;
+
+ i = tcaps->cpos;
+ while (i < size)
+ {
+ tputs(tgetstr("nd", NULL), 1, ft_putchar);
+ i++;
+ }
+ tcaps->cpos = size;
+ return (1);
+}
+
+
+int16_t
c_key_right(uint32_t len,
t_caps *tcaps)
{