aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_term.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-07-27 08:38:04 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-07-27 08:38:04 +0000
commit045d89ac24985c4ef7d5bc10d85666882637dd62 (patch)
tree8a2d38d0ba8938d2f2ba6d85e04a621eb7b286cb /mdoc_term.c
parentc5cc67f801d437ed8601ac67e37ccdc77f0cac0b (diff)
downloadmandoc-045d89ac24985c4ef7d5bc10d85666882637dd62.tar.gz
mandoc-045d89ac24985c4ef7d5bc10d85666882637dd62.tar.zst
mandoc-045d89ac24985c4ef7d5bc10d85666882637dd62.zip
Fix how `Bd -unfilled' and `Bd -literal' break lines. This unbreaks
displays to work as old groff shows them; however, new groff still does some fancy shit.
Diffstat (limited to 'mdoc_term.c')
-rw-r--r--mdoc_term.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index 1941e07c..57cf41ac 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.178 2010/07/26 22:35:59 kristaps Exp $ */
+/* $Id: mdoc_term.c,v 1.179 2010/07/27 08:38:04 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -1621,8 +1621,7 @@ termp_fa_pre(DECL_ARGS)
static int
termp_bd_pre(DECL_ARGS)
{
- size_t tabwidth;
- size_t rm, rmax;
+ size_t tabwidth, rm, rmax;
const struct mdoc_node *nn;
if (MDOC_BLOCK == n->type) {
@@ -1654,12 +1653,9 @@ termp_bd_pre(DECL_ARGS)
p->rmargin = p->maxrmargin = TERM_MAXMARGIN;
for (nn = n->child; nn; nn = nn->next) {
- p->flags |= TERMP_NOSPACE;
+ if (nn->prev && nn->prev->line < nn->line)
+ term_newln(p);
print_mdoc_node(p, pair, m, nn);
- if (NULL == nn->prev ||
- nn->prev->line < nn->line ||
- NULL == nn->next)
- term_flushln(p);
}
p->tabwidth = tabwidth;