summaryrefslogtreecommitdiffstats
path: root/man_term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2018-06-10 15:12:35 +0000
committerIngo Schwarze <schwarze@openbsd.org>2018-06-10 15:12:35 +0000
commit7aa5d287ad5185549e44868b9474c7b186d69a5f (patch)
tree5a3c3d1ef1f02fd9e51b88bd1056b4ba3e2ee58d /man_term.c
parent6a983151b18e81b5b04f3c5185ab00e974c51e17 (diff)
downloadmandoc-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.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/man_term.c b/man_term.c
index 9e660d4a..a0b90861 100644
--- a/man_term.c
+++ b/man_term.c
@@ -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);
}