summaryrefslogtreecommitdiffstats
path: root/src/c_utils.c
diff options
context:
space:
mode:
authorsalad <fmoenne-@student.le-101.fr>2020-09-23 14:44:10 +0200
committersalad <fmoenne-@student.le-101.fr>2020-09-23 14:44:10 +0200
commiteea91f3f55856b9ba15d3c96096e328d1154c7b2 (patch)
treef4e6d97326f90f694a7707ae927aa08ae1692271 /src/c_utils.c
parentHELL YEAH BROTHER (diff)
download42-minishell-eea91f3f55856b9ba15d3c96096e328d1154c7b2.tar.gz
42-minishell-eea91f3f55856b9ba15d3c96096e328d1154c7b2.tar.bz2
42-minishell-eea91f3f55856b9ba15d3c96096e328d1154c7b2.tar.xz
42-minishell-eea91f3f55856b9ba15d3c96096e328d1154c7b2.tar.zst
42-minishell-eea91f3f55856b9ba15d3c96096e328d1154c7b2.zip
norme this motherrfucker
Diffstat (limited to 'src/c_utils.c')
-rw-r--r--src/c_utils.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/c_utils.c b/src/c_utils.c
index 43ed94e..16ed4f0 100644
--- a/src/c_utils.c
+++ b/src/c_utils.c
@@ -162,19 +162,19 @@ int16_t
{
if (nlines != tcaps->lpos)
{
- ft_printf("%d", tcaps->cpos);
while (--nlines > tcaps->lpos)
tputs(tgetstr("up", NULL), 1, ft_putchar);
- tputs(tgetstr("cr", NULL), 1, ft_putchar); /* cr, cpos mauvaise col, bonne ligne */
tputs(tgetstr("up", NULL), 1, ft_putchar);
- while (i < (tcaps->cpos))
+ tputs(tgetstr("cr", NULL), 1, ft_putchar); /* cr, cpos mauvaise col, bonne ligne */
+ while (i <= (tcaps->cpos + ft_strlen(msh->ps[0])))
{
tputs(tgetstr("nd", NULL), 1, ft_putchar); /* cr, cpos mauvaise col, bonne ligne */
i++;
}
}
- while (--len > tcaps->cpos)
- tputs(tgetstr("le", NULL), 1, ft_putchar);
+ else
+ while (--len > tcaps->cpos)
+ tputs(tgetstr("le", NULL), 1, ft_putchar);
}
return (ret);
}