From aca7ae2918a380aa3742a8d4b74b75a4a6a2e7ef Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Thu, 16 Jul 2009 13:17:51 +0000 Subject: Subtle fixes correcting vis count with erroneously-decorated whitespace. --- term.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'term.c') diff --git a/term.c b/term.c index 0bb24de0..908c5854 100644 --- a/term.c +++ b/term.c @@ -1,4 +1,4 @@ -/* $Id: term.c,v 1.88 2009/07/16 12:34:06 kristaps Exp $ */ +/* $Id: term.c,v 1.89 2009/07/16 13:17:51 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -252,10 +252,10 @@ term_flushln(struct termp *p) /* LINTED */ for (j = i, vsz = 0; j < (int)p->col; j++) { - if (' ' == p->buf[j]) + if (' ' == p->buf[j]) break; else if (8 == p->buf[j]) - j += 1; + vsz--; else vsz++; } @@ -549,8 +549,8 @@ term_chara(struct termp *p, char c) static void term_encodea(struct termp *p, char c) { - - if (TERMP_STYLE & p->flags) { + + if (' ' != c && TERMP_STYLE & p->flags) { if (TERMP_BOLD & p->flags) { term_chara(p, c); term_chara(p, 8); -- cgit v1.2.3