summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/c_utils.c17
-rw-r--r--src/lposbin0 -> 2758 bytes
2 files changed, 17 insertions, 0 deletions
diff --git a/src/c_utils.c b/src/c_utils.c
index 372f66d..43ed94e 100644
--- a/src/c_utils.c
+++ b/src/c_utils.c
@@ -155,9 +155,26 @@ int16_t
tputs(tgetstr("nd", NULL), 1, ft_putchar);
i++;
}
+ nlines = c_get_line_num(line, tcaps->cpos, ft_strlen(msh->ps[0]), tcaps);
ret = ft_printf("%s", line);
+ i = 0;
if (tcaps->cpos != len)
+ {
+ if (nlines != tcaps->lpos)
+ {
+ ft_printf("%d", tcaps->cpos);
+ while (--nlines > tcaps->lpos)
+ tputs(tgetstr("up", NULL), 1, ft_putchar);
+ tputs(tgetstr("cr", NULL), 1, ft_putchar); /* cr, cpos mauvaise col, bonne ligne */
+ tputs(tgetstr("up", NULL), 1, ft_putchar);
+ while (i < (tcaps->cpos))
+ {
+ tputs(tgetstr("nd", NULL), 1, ft_putchar); /* cr, cpos mauvaise col, bonne ligne */
+ i++;
+ }
+ }
while (--len > tcaps->cpos)
tputs(tgetstr("le", NULL), 1, ft_putchar);
+ }
return (ret);
}
diff --git a/src/lpos b/src/lpos
new file mode 100644
index 0000000..fa32915
--- /dev/null
+++ b/src/lpos
Binary files differ