summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorsalad <fmoenne-@student.le-101.fr>2020-09-20 14:55:03 +0200
committersalad <fmoenne-@student.le-101.fr>2020-09-20 14:55:03 +0200
commiteef52a625c1676946b0dddfe211ebfbe62ff81b1 (patch)
tree2a35449688d347883b055e3f65fa77a86f34ea53 /src
parentreworking redraw line lets go (diff)
download42-minishell-eef52a625c1676946b0dddfe211ebfbe62ff81b1.tar.gz
42-minishell-eef52a625c1676946b0dddfe211ebfbe62ff81b1.tar.bz2
42-minishell-eef52a625c1676946b0dddfe211ebfbe62ff81b1.tar.xz
42-minishell-eef52a625c1676946b0dddfe211ebfbe62ff81b1.tar.zst
42-minishell-eef52a625c1676946b0dddfe211ebfbe62ff81b1.zip
ffs
Diffstat (limited to 'src')
-rw-r--r--src/c_init.c1
-rw-r--r--src/c_input.c2
-rw-r--r--src/c_utils.c8
3 files changed, 6 insertions, 5 deletions
diff --git a/src/c_init.c b/src/c_init.c
index 2992789..8f5a573 100644
--- a/src/c_init.c
+++ b/src/c_init.c
@@ -97,7 +97,6 @@ int16_t
else if (ft_strncmp(buf, tgetstr("kb", NULL), ft_strlen(tgetstr("kb", NULL))) == 0)
{
c_back_slash(&line, tcaps);
- c_redraw_line(line, tcaps, msh);
return (1);
}
else if (buf[0] == '\n')
diff --git a/src/c_input.c b/src/c_input.c
index 4dab9f0..be72aa9 100644
--- a/src/c_input.c
+++ b/src/c_input.c
@@ -86,7 +86,7 @@ int16_t
if (tcaps->cpos >= 1)
{
*line = c_delchar(*line, tcaps->cpos);
- tcaps->cpos -= 1;
+ tcaps->cpos--;
tputs(tgetstr("le", NULL), 1, ft_putchar);
tputs(tgetstr("dc", NULL), 1, ft_putchar);
}
diff --git a/src/c_utils.c b/src/c_utils.c
index d5d818a..56cfbaa 100644
--- a/src/c_utils.c
+++ b/src/c_utils.c
@@ -139,9 +139,11 @@ int16_t
tputs(tgetstr("cr", NULL), 1, ft_putchar);
if (nlines > 1)
{
- tputs(tgetstr("sf", NULL), 1, ft_putchar);
- tputs(tgetstr("up", NULL), 1, ft_putchar);
+ ft_printf("qwe");
+ /* if (tcaps->lpos > 1) */
+ tputs(tgetstr("up", NULL), 1, ft_putchar);
tputs(tgetstr("up", NULL), 1, ft_putchar);
+ tputs(tgetstr("sf", NULL), 1, ft_putchar);
}
while (i < ft_strlen(msh->ps[0]))
{
@@ -152,5 +154,5 @@ int16_t
if (tcaps->cpos != len)
while (--len > tcaps->cpos)
tputs(tgetstr("le", NULL), 1, ft_putchar);
- return (ret);
+ return (i);
}