summaryrefslogtreecommitdiffstats
path: root/mdoc_term.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-05-09 16:38:38 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-05-09 16:38:38 +0000
commit5ff5a51fb08323eaf55f975580b636f10b0bca6f (patch)
treed38b98314d3a121e2b162cda5eb814126f22cf15 /mdoc_term.c
parentc7124b7f6ae338dabb529adad18f2e6892b5ae8d (diff)
downloadmandoc-5ff5a51fb08323eaf55f975580b636f10b0bca6f.tar.gz
Setting maxmargin, too (for completion).
Diffstat (limited to 'mdoc_term.c')
-rw-r--r--mdoc_term.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index b1005c10..282d271a 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1629,7 +1629,7 @@ static int
termp_bd_pre(DECL_ARGS)
{
int i, type;
- size_t sv;
+ size_t rm, rmax;
const struct mdoc_node *nn;
if (MDOC_BLOCK == n->type) {
@@ -1657,8 +1657,9 @@ termp_bd_pre(DECL_ARGS)
if (MDOC_Literal != type && MDOC_Unfilled != type)
return(1);
- sv = p->rmargin;
- p->rmargin = 100000; /* FIXME */
+ rm = p->rmargin;
+ rmax = p->maxrmargin;
+ p->rmargin = p->maxrmargin = 100000; /* FIXME */
for (nn = n->child; nn; nn = nn->next) {
p->flags |= TERMP_NOSPACE;
@@ -1671,7 +1672,8 @@ termp_bd_pre(DECL_ARGS)
term_flushln(p);
}
- p->rmargin = sv;
+ p->rmargin = rm;
+ p->maxrmargin = rmax;
return(0);
}
@@ -1681,7 +1683,7 @@ static void
termp_bd_post(DECL_ARGS)
{
int type;
- size_t sv;
+ size_t rm, rmax;
if (MDOC_BODY != n->type)
return;
@@ -1689,15 +1691,17 @@ termp_bd_post(DECL_ARGS)
type = arg_disptype(n->parent);
assert(-1 != type);
- sv = p->rmargin;
+ rm = p->rmargin;
+ rmax = p->maxrmargin;
if (MDOC_Literal == type || MDOC_Unfilled == type)
- p->rmargin = 100000; /* FIXME */
+ p->rmargin = p->maxrmargin = 100000; /* FIXME */
p->flags |= TERMP_NOSPACE;
term_flushln(p);
- p->rmargin = sv;
+ p->rmargin = rm;
+ p->maxrmargin = rmax;
}