From f2c93fb7f2e5b82388dd8d45d63f380906fed04e Mon Sep 17 00:00:00 2001 From: salad Date: Tue, 6 Oct 2020 17:10:33 +0200 Subject: C-b + C-f --- src/c_utils.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/c_utils.c') diff --git a/src/c_utils.c b/src/c_utils.c index a62e3f9..23d5007 100644 --- a/src/c_utils.c +++ b/src/c_utils.c @@ -112,6 +112,7 @@ static int16_t uint32_t i; uint32_t j; + /* ft_printf("%u%u", tcaps->nlines, tcaps->lpos); */ i = (tcaps->nlines == tcaps->lpos) ? 0 : tcaps->ws.ws_col * (tcaps->lpos - 1); j = tcaps->nlines; if (tcaps->nlines != tcaps->lpos) @@ -147,10 +148,11 @@ int16_t i = 0; j = tcaps->lpos; tputs(tgetstr("cr", NULL), 1, ft_putchar); - if ((((tcaps->cpos - 1) + ft_strlen(msh->ps[tcaps->psx])) % + if ((((tcaps->cpos + 1) + ft_strlen(msh->ps[tcaps->psx])) % tcaps->ws.ws_col) == 0) { tputs(tgetstr("sf", NULL), 1, ft_putchar); + return (1); } while (--j > 0) { -- cgit v1.2.3