diff options
Diffstat (limited to 'src/c_keys.c')
-rw-r--r-- | src/c_keys.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/c_keys.c b/src/c_keys.c index c303a91..d37a76e 100644 --- a/src/c_keys.c +++ b/src/c_keys.c @@ -60,13 +60,24 @@ int16_t uint16_t i; uint16_t j; - i = (tcaps->lpos > 0) ? tcaps->cpos : (tcaps->ws.ws_col * tcaps->nlines - 1); - j = 0; - if (tcaps->cpos < size && tcaps->lpos > 0) + /* i = (tcaps->nlines == (tcaps->lpos)) ? 0 : tcaps->ws.ws_col * (tcaps->lpos); */ + i = 0; + j = (tcaps->lpos); + if (tcaps->cpos < size && j < tcaps->nlines) { - while (j++ < (tcaps->nlines - 1)) + while (j < (tcaps->nlines)) + { tputs(tgetstr("do", NULL), 1, ft_putchar); + j++; + i += tcaps->ws.ws_col; + } tputs(tgetstr("cr", NULL), 1, ft_putchar); + /* ft_printf("[%d][%d]", i, size); */ + while (i < (size + 13)) + { + tputs(tgetstr("nd", NULL), 1, ft_putchar); + i++; + } } else while (i++ < size) |