summaryrefslogtreecommitdiffstats
path: root/man_term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2019-01-05 00:36:50 +0000
committerIngo Schwarze <schwarze@openbsd.org>2019-01-05 00:36:50 +0000
commitd8913894b97315b5c09b9489ccee2d1f74f0c450 (patch)
tree2dc7d0348225eb3b00c73e760bd0a2321e97bcac /man_term.c
parent8140a5cf4789491731d059713fd14af34686dcc3 (diff)
downloadmandoc-d8913894b97315b5c09b9489ccee2d1f74f0c450.tar.gz
Some high-level block macros have an effect similar to temporarily
suspending no-fill mode during their head. Model this with an additional roff parser state flag ROFF_NONOFILL. That is much simpler than it would be to save and restore the ROFF_NOFILL flag itself, in particular since the latter can be switched (with lasting effect) by the .nf and .fi requests even while its effect is temporarily suspended. This commit does not change formatting yet, but prepares for future formatting simplifications and improvements.
Diffstat (limited to 'man_term.c')
-rw-r--r--man_term.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/man_term.c b/man_term.c
index 224297b5..58713d62 100644
--- a/man_term.c
+++ b/man_term.c
@@ -1,7 +1,7 @@
/* $Id$ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
- * Copyright (c) 2010-2015, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2010-2015, 2017-2019 Ingo Schwarze <schwarze@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -419,7 +419,10 @@ pre_HP(DECL_ARGS)
return 0;
}
- if ((n->flags & NODE_NOFILL) == 0) {
+ if (n->child == NULL)
+ return 0;
+
+ if ((n->child->flags & NODE_NOFILL) == 0) {
p->flags |= TERMP_NOBREAK | TERMP_BRIND;
p->trailspace = 2;
}