diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-07-16 13:17:51 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-07-16 13:17:51 +0000 |
commit | e2499b83d7cb9ea91422b22a43415a5d3e9270b4 (patch) | |
tree | c1303830ae0b0df706eb1c1a0cc05d919203b520 /term.c | |
parent | aebdcef58e30d0ed35533f2cd4165612d8571e7e (diff) | |
download | mandoc-e2499b83d7cb9ea91422b22a43415a5d3e9270b4.tar.gz |
Subtle fixes correcting vis count with erroneously-decorated whitespace.
Diffstat (limited to 'term.c')
-rw-r--r-- | term.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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); |