diff options
author | salad <fmoenne-@student.le-101.fr> | 2020-10-06 17:10:33 +0200 |
---|---|---|
committer | salad <fmoenne-@student.le-101.fr> | 2020-10-06 17:10:33 +0200 |
commit | f2c93fb7f2e5b82388dd8d45d63f380906fed04e (patch) | |
tree | fb3ebc675f184cea32d2e97c2215675f5cdd6f3c /src/c_utils.c | |
parent | some changes, need MORE (diff) | |
download | 42-minishell-f2c93fb7f2e5b82388dd8d45d63f380906fed04e.tar.gz 42-minishell-f2c93fb7f2e5b82388dd8d45d63f380906fed04e.tar.bz2 42-minishell-f2c93fb7f2e5b82388dd8d45d63f380906fed04e.tar.xz 42-minishell-f2c93fb7f2e5b82388dd8d45d63f380906fed04e.tar.zst 42-minishell-f2c93fb7f2e5b82388dd8d45d63f380906fed04e.zip |
C-b + C-f
Diffstat (limited to 'src/c_utils.c')
-rw-r--r-- | src/c_utils.c | 4 |
1 files changed, 3 insertions, 1 deletions
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) { |