summaryrefslogtreecommitdiffstats
path: root/src/c_keys.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/c_keys.c')
-rw-r--r--src/c_keys.c4
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)
{