From a61be744a8e1beef9f90b57de4c493b034b2ffa1 Mon Sep 17 00:00:00 2001 From: salad Date: Mon, 21 Sep 2020 17:29:35 +0200 Subject: line curs lesgo --- src/c_utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/c_utils.c') diff --git a/src/c_utils.c b/src/c_utils.c index dc9522d..372f66d 100644 --- a/src/c_utils.c +++ b/src/c_utils.c @@ -139,12 +139,12 @@ int16_t len = ft_strlen(line); mod = (tcaps->ws.ws_col); tputs(tgetstr("cr", NULL), 1, ft_putchar); - if (((len + ft_strlen(msh->ps[0])) % mod) == 0) + if (((tcaps->cpos + ft_strlen(msh->ps[0])) % mod) == 0) { tputs(tgetstr("sf", NULL), 1, ft_putchar); return (1); } - while (--nlines > 0) + while (--tcaps->lpos > 0) { tputs(tgetstr("sf", NULL), 1, ft_putchar); tputs(tgetstr("up", NULL), 1, ft_putchar); -- cgit v1.2.3