diff options
author | Salad <water_appreciator@protonmail.com> | 2020-10-19 17:32:53 +0200 |
---|---|---|
committer | Salad <water_appreciator@protonmail.com> | 2020-10-19 17:32:53 +0200 |
commit | 35ea2d4a8a529c8680891cd1aae8cfe0088dd284 (patch) | |
tree | 465f5be4e8900152151f384adeacb188e0b9c03a /src/c_keys.c | |
parent | qsd (diff) | |
download | 42-minishell-35ea2d4a8a529c8680891cd1aae8cfe0088dd284.tar.gz 42-minishell-35ea2d4a8a529c8680891cd1aae8cfe0088dd284.tar.bz2 42-minishell-35ea2d4a8a529c8680891cd1aae8cfe0088dd284.tar.xz 42-minishell-35ea2d4a8a529c8680891cd1aae8cfe0088dd284.tar.zst 42-minishell-35ea2d4a8a529c8680891cd1aae8cfe0088dd284.zip |
FIX ALL NIG
Diffstat (limited to 'src/c_keys.c')
-rw-r--r-- | src/c_keys.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/c_keys.c b/src/c_keys.c index a5b90fb..5a036e6 100644 --- a/src/c_keys.c +++ b/src/c_keys.c @@ -51,6 +51,7 @@ int16_t tputs(tgetstr("le", NULL), 1, ft_putchar); } tcaps->cpos = 0; + tcaps->lpos = 1; return (1); } @@ -79,6 +80,7 @@ int16_t while (i++ < size) tputs(tgetstr("nd", NULL), 1, ft_putchar); tcaps->cpos = size; + tcaps->lpos = tcaps->nlines; return (1); } @@ -93,6 +95,7 @@ int16_t tputs(tgetstr("do", NULL), 1, ft_putchar); tputs(tgetstr("cr", NULL), 1, ft_putchar); tcaps->cpos++; + tcaps->lpos++; } else if (tcaps->cpos < len) { @@ -116,6 +119,7 @@ int16_t while(++pos <= (tcaps->ws.ws_col)) tputs(tgetstr("nd", NULL), 1, ft_putchar); tcaps->cpos--; + tcaps->lpos--; } else if (tcaps->cpos >= 1) { |