summaryrefslogtreecommitdiffstats
path: root/src/c_keys.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/c_keys.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/c_keys.c b/src/c_keys.c
index f9141d7..fc8962e 100644
--- a/src/c_keys.c
+++ b/src/c_keys.c
@@ -63,7 +63,7 @@ int16_t
uint32_t plen,
t_caps *tcaps)
{
- if (((tcaps->cpos + 1) % (tcaps->ws.ws_col - plen)) == 0 && tcaps->cpos < len)
+ if (((tcaps->cpos + plen + 1) % (tcaps->ws.ws_col)) == 0 && tcaps->cpos < len)
{
tputs(tgetstr("do", NULL), 1, ft_putchar);
tputs(tgetstr("cr", NULL), 1, ft_putchar);
@@ -86,7 +86,7 @@ int16_t
(void)len;
pos = -1;
- if (((tcaps->cpos) % (tcaps->ws.ws_col - plen)) == 0 && tcaps->cpos >= 1)
+ if (((tcaps->cpos + plen) % (tcaps->ws.ws_col )) == 0 && tcaps->cpos >= 1)
{
tputs(tgetstr("up", NULL), 1, ft_putchar);
while(++pos <= (tcaps->ws.ws_col))