summaryrefslogtreecommitdiffstatshomepage
path: root/term.c
diff options
context:
space:
mode:
Diffstat (limited to 'term.c')
-rw-r--r--term.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/term.c b/term.c
index 0a7739da..9ac3039f 100644
--- a/term.c
+++ b/term.c
@@ -1,4 +1,4 @@
-/* $Id: term.c,v 1.103 2009/09/23 11:02:21 kristaps Exp $ */
+/* $Id: term.c,v 1.104 2009/10/10 11:05:23 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -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(' ');