summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-03-08 16:22:04 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-03-08 16:22:04 +0000
commit2c2cab8eb564315678f34841e5cda810f00ddcf0 (patch)
tree1984baf61405502b36d9d4804780d0afd4bca16d
parentc3b19f4aeeab34b70784875fb9ac21067a5a5bc8 (diff)
downloadmandoc-2c2cab8eb564315678f34841e5cda810f00ddcf0.tar.gz
In .nf mode, use the MAN_LINE flag to detect input line breaks
instead of the man_node line member. This is required to preserve line breaks contained in user-defined macros called in .nf mode. Found in a code audit triggered by fixing a similar issue in .TP.
-rw-r--r--man_term.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/man_term.c b/man_term.c
index 08ed0a02..5babe788 100644
--- a/man_term.c
+++ b/man_term.c
@@ -1045,7 +1045,7 @@ out:
* more specific than this.
*/
if (MANT_LITERAL & mt->fl && ! (TERMP_NOBREAK & p->flags) &&
- (NULL == n->next || n->next->line > n->line)) {
+ (NULL == n->next || MAN_LINE & n->next->flags)) {
rm = p->rmargin;
rmax = p->maxrmargin;
p->rmargin = p->maxrmargin = TERM_MAXMARGIN;