aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/man_term.c
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
commit2afc19291f2b386a1d2d38096a53b25487d9a744 (patch)
tree59b3b28e098466428c0814ac2aa6a439c1dde9ae /man_term.c
parent49fc5b876caef96271d1484f9279fd423d9b04ff (diff)
downloadmandoc-2afc19291f2b386a1d2d38096a53b25487d9a744.tar.gz
mandoc-2afc19291f2b386a1d2d38096a53b25487d9a744.tar.zst
mandoc-2afc19291f2b386a1d2d38096a53b25487d9a744.zip
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.
Diffstat (limited to 'man_term.c')
-rw-r--r--man_term.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/man_term.c b/man_term.c
index 3c059283..4e894e79 100644
--- a/man_term.c
+++ b/man_term.c
@@ -1,4 +1,4 @@
-/* $Id: man_term.c,v 1.141 2014/03/08 15:50:41 schwarze Exp $ */
+/* $Id: man_term.c,v 1.142 2014/03/08 16:22:04 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -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;