summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2013-05-29 15:17:52 +0000
committerIngo Schwarze <schwarze@openbsd.org>2013-05-29 15:17:52 +0000
commit03185a10aa6972aeaa81144ae84194480f5549a5 (patch)
tree02200be30b48621d0a20d853e513c4c30cf71a1e
parentb051d756c59c51ffbd2f7fc24b466aaafd1b5fbc (diff)
downloadmandoc-03185a10aa6972aeaa81144ae84194480f5549a5.tar.gz
In keep mode, if any text is printed (even in NOSPACE mode),
any text that follows must be kept on the same line. I already found the issue and wrote the patch in April 2011, but didn't come round to do proper testing and forgot about it.
-rw-r--r--term.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/term.c b/term.c
index c59d13df..9c10bce7 100644
--- a/term.c
+++ b/term.c
@@ -406,14 +406,14 @@ term_word(struct termp *p, const char *word)
if ( ! (TERMP_NOSPACE & 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 (TERMP_PREKEEP & p->flags)
+ p->flags |= TERMP_KEEP;
if ( ! (p->flags & TERMP_NONOSPACE))
p->flags &= ~TERMP_NOSPACE;