diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2013-12-24 19:11:45 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2013-12-24 19:11:45 +0000 |
commit | 8d226e7d9f28fbbca5bd6969e8fe3e6ee69ec94e (patch) | |
tree | e007bba721cb9d9e5ad54d2316dd8d2fd6ff6fdd /mdoc_term.c | |
parent | 843cccd2fcf4de8a13a16071c949374ee597d16e (diff) | |
download | mandoc-8d226e7d9f28fbbca5bd6969e8fe3e6ee69ec94e.tar.gz |
When deciding whether two consecutive macros are on the same input line,
we have to compare the line where the first one *ends* (not where it begins)
to the line where the second one starts.
This fixes the bug that .Bk allowed output line breaks right after block
macros spanning more than one input line, even when the next macro follows
on the same line.
Diffstat (limited to 'mdoc_term.c')
-rw-r--r-- | mdoc_term.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mdoc_term.c b/mdoc_term.c index 244be965..1eaa47db 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -313,7 +313,7 @@ print_mdoc_node(DECL_ARGS) */ if (TERMP_KEEP & p->flags || MDOC_SYNPRETTY & n->flags) { - if (n->prev ? (n->prev->line != n->line) : + if (n->prev ? (n->prev->lastline != n->line) : (n->parent && n->parent->line != n->line)) { p->flags &= ~TERMP_KEEP; p->flags |= TERMP_PREKEEP; |