From d4849c125a2536970d94e48746b9c97cddeee0c1 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sat, 4 Apr 2015 11:44:43 +0000 Subject: Fix a quirk with respect to empty .HP. Found while writing a regression test for man_macro.c rev. 1.66. Incidentally, this brings rendering of XFreeEventData(3) closer to groff. --- man_term.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/man_term.c b/man_term.c index 473b25e4..d0dd4263 100644 --- a/man_term.c +++ b/man_term.c @@ -533,6 +533,17 @@ post_HP(DECL_ARGS) switch (n->type) { case ROFFT_BODY: term_newln(p); + + /* + * Compatibility with a groff bug. + * The .HP macro uses the undocumented .tag request + * which causes a line break and cancels no-space + * mode even if there isn't any output. + */ + + if (n->child == NULL) + term_vspace(p); + p->flags &= ~(TERMP_NOBREAK | TERMP_BRIND); p->trailspace = 0; p->offset = mt->offset; -- cgit