summaryrefslogtreecommitdiffstats
path: root/term.c
diff options
context:
space:
mode:
Diffstat (limited to 'term.c')
-rw-r--r--term.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/term.c b/term.c
index 2392a621..91638e25 100644
--- a/term.c
+++ b/term.c
@@ -159,7 +159,7 @@ void
term_flushln(struct termp *p)
{
int i, j;
- size_t vbl, vsz, vis, maxvis, mmax, bp;
+ size_t vbl, vsz, vis, maxvis, mmax, bp, os;
static int overstep = 0;
/*
@@ -172,6 +172,9 @@ term_flushln(struct termp *p)
assert(p->offset < p->rmargin);
assert((int)(p->rmargin - p->offset) - overstep > 0);
+ /* Save the overstep. */
+ os = (size_t)overstep;
+
maxvis = /* LINTED */
p->rmargin - p->offset - overstep;
mmax = /* LINTED */
@@ -233,6 +236,9 @@ term_flushln(struct termp *p)
putchar(' ');
vis = 0;
}
+ /* Remove the overstep width. */
+ bp += os;
+ os = 0;
} else {
for (j = 0; j < (int)vbl; j++)
putchar(' ');