aboutsummaryrefslogtreecommitdiff
path: root/tea.c
diff options
context:
space:
mode:
Diffstat (limited to 'tea.c')
-rw-r--r--tea.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/tea.c b/tea.c
index db1239d..3797c21 100644
--- a/tea.c
+++ b/tea.c
@@ -239,11 +239,18 @@ int main() {
prn("\b");
delc();
x--;
+ if (x == 1) {
+ prn(CSI "0m");
+ for (i = 1; i < margin; i++)
+ prn(" ");
+ x = margin;
+ }
break;
default:
if (iscntrl(c)) break;
if (x == margin && c == '.') {
- prn(CSI "%dD", margin - 1);
+ prn(CSI "%d;%dH", y, 1);
+ x = 1;
prn(CSI "2m");
}
addc(c);
@@ -256,6 +263,7 @@ int main() {
quit:
prn(CSI "%d;%dH", yorig, xorig);
prn(CSI "J"); /* delete from cursor to end of display (ED) */
+ prn(CSI "0m");
raw(false);
printf("%s", src);
return 0;