summaryrefslogtreecommitdiffstats
path: root/term.c
diff options
context:
space:
mode:
Diffstat (limited to 'term.c')
-rw-r--r--term.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/term.c b/term.c
index 4338559b..8af60c41 100644
--- a/term.c
+++ b/term.c
@@ -242,10 +242,10 @@ term_flushln(struct termp *p)
if ('\t' == p->buf[i])
break;
if (' ' == p->buf[i]) {
- while (' ' == p->buf[i]) {
- vbl += (*p->width)(p, p->buf[i]);
+ j = i;
+ while (' ' == p->buf[i])
i++;
- }
+ vbl += (i - j) * (*p->width)(p, ' ');
break;
}
if (ASCII_NBRSP == p->buf[i]) {