aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/term.c
diff options
context:
space:
mode:
Diffstat (limited to 'term.c')
-rw-r--r--term.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/term.c b/term.c
index ed268e56..da1f20c9 100644
--- a/term.c
+++ b/term.c
@@ -1,4 +1,4 @@
-/* $Id: term.c,v 1.227 2014/08/10 23:54:41 schwarze Exp $ */
+/* $Id: term.c,v 1.228 2014/08/18 21:07:53 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -220,7 +220,7 @@ term_flushln(struct termp *p)
break;
if (' ' == p->buf[i]) {
j = i;
- while (' ' == p->buf[i])
+ while (i < p->col && ' ' == p->buf[i])
i++;
dv = (i - j) * (*p->width)(p, ' ');
vbl += dv;