summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-07-16 13:17:51 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-07-16 13:17:51 +0000
commitaca7ae2918a380aa3742a8d4b74b75a4a6a2e7ef (patch)
tree1766b57ac103a70a05f3d628193c3f60532a80ab
parentfc215c3578c271c66987bbd05025602ef9306f33 (diff)
downloadmandoc-aca7ae2918a380aa3742a8d4b74b75a4a6a2e7ef.tar.gz
mandoc-aca7ae2918a380aa3742a8d4b74b75a4a6a2e7ef.tar.zst
mandoc-aca7ae2918a380aa3742a8d4b74b75a4a6a2e7ef.zip
Subtle fixes correcting vis count with erroneously-decorated whitespace.
-rw-r--r--mdoc_action.c17
-rw-r--r--term.c10
2 files changed, 6 insertions, 21 deletions
diff --git a/mdoc_action.c b/mdoc_action.c
index 8bc981fe..88e70b54 100644
--- a/mdoc_action.c
+++ b/mdoc_action.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_action.c,v 1.28 2009/07/15 15:53:57 kristaps Exp $ */
+/* $Id: mdoc_action.c,v 1.29 2009/07/16 13:17:51 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -298,11 +298,6 @@ post_lb(POST_ARGS)
char *buf;
size_t sz;
- /*
- * FIXME: this must be broken apart into a series of TEXT nodes,
- * each containing a single word.
- */
-
assert(MDOC_TEXT == m->last->child->type);
p = mdoc_a2lib(m->last->child->string);
if (NULL == p) {
@@ -331,11 +326,6 @@ post_st(POST_ARGS)
{
const char *p;
- /*
- * FIXME: this must be broken apart into a series of TEXT nodes,
- * each containing a single word.
- */
-
assert(MDOC_TEXT == m->last->child->type);
p = mdoc_a2st(m->last->child->string);
assert(p);
@@ -353,11 +343,6 @@ post_at(POST_ARGS)
struct mdoc_node *n;
const char *p;
- /*
- * FIXME: this must be broken apart into a series of TEXT nodes,
- * each containing a single word.
- */
-
if (m->last->child) {
assert(MDOC_TEXT == m->last->child->type);
p = mdoc_a2att(m->last->child->string);
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 <kristaps@kth.se>
*
@@ -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);