summaryrefslogtreecommitdiffstats
path: root/term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2010-06-27 01:26:20 +0000
committerIngo Schwarze <schwarze@openbsd.org>2010-06-27 01:26:20 +0000
commit186075c603215a3baa6ee2dd6ff0060ae58deb63 (patch)
tree6a031f6e6b2fe6e9aef2093cce03b01c787d5d89 /term.c
parentc5cf90497acc3621015972b85b9c079b43601342 (diff)
downloadmandoc-186075c603215a3baa6ee2dd6ff0060ae58deb63.tar.gz
Basic implementation of .Bk/.Ek; from OpenBSD.
OK and one stylistic tweak by kristaps@.
Diffstat (limited to 'term.c')
-rw-r--r--term.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/term.c b/term.c
index fef878d7..1d51ed4b 100644
--- a/term.c
+++ b/term.c
@@ -480,9 +480,14 @@ term_word(struct termp *p, const char *word)
}
if ( ! (TERMP_NOSPACE & p->flags)) {
- bufferc(p, ' ');
- if (TERMP_SENTENCE & p->flags)
+ if ( ! (TERMP_KEEP & p->flags)) {
+ if (TERMP_PREKEEP & p->flags)
+ p->flags |= TERMP_KEEP;
bufferc(p, ' ');
+ if (TERMP_SENTENCE & p->flags)
+ bufferc(p, ' ');
+ } else
+ bufferc(p, ASCII_NBRSP);
}
if ( ! (p->flags & TERMP_NONOSPACE))