diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2018-06-10 15:12:35 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2018-06-10 15:12:35 +0000 |
commit | 7aa5d287ad5185549e44868b9474c7b186d69a5f (patch) | |
tree | 5a3c3d1ef1f02fd9e51b88bd1056b4ba3e2ee58d /man_term.c | |
parent | 6a983151b18e81b5b04f3c5185ab00e974c51e17 (diff) | |
download | mandoc-7aa5d287ad5185549e44868b9474c7b186d69a5f.tar.gz |
When formatting man(7) documents that do not contain .SH macros
with -Tps or -Tpdf, do not squeeze the whole text beyond the right
margin. Bug reported by Will Backman during BSDCan.
Diffstat (limited to 'man_term.c')
-rw-r--r-- | man_term.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -1032,6 +1032,18 @@ print_man_foot(struct termp *p, const struct roff_meta *meta) term_word(p, title); term_flushln(p); + + /* + * Reset the terminal state for more output after the footer: + * Some output modes, in particular PostScript and PDF, print + * the header and the footer into a buffer such that it can be + * reused for multiple output pages, then go on to format the + * main text. + */ + + p->tcol->offset = 0; + p->flags = 0; + free(title); } |