diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-04-04 11:44:43 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-04-04 11:44:43 +0000 |
commit | d4849c125a2536970d94e48746b9c97cddeee0c1 (patch) | |
tree | 2d9dab87624469ef0c868198dcfbc19c97ac3c66 | |
parent | feb386c64b508cc5bd8206298625ac7d79cbf93b (diff) | |
download | mandoc-d4849c125a2536970d94e48746b9c97cddeee0c1.tar.gz |
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.
-rw-r--r-- | man_term.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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; |