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 | c44d370823355882e5013556927675ea11fa8199 (patch) | |
tree | e5ca7b872be82c962a4e6000f73ca020475a3cbc | |
parent | 2568d499c74ba9bba7ed379f8fa8717b62bdadf9 (diff) | |
download | mandoc-c44d370823355882e5013556927675ea11fa8199.tar.gz mandoc-c44d370823355882e5013556927675ea11fa8199.tar.zst mandoc-c44d370823355882e5013556927675ea11fa8199.zip |
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.
-rw-r--r-- | man_term.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: man_term.c,v 1.210 2018/04/11 17:11:13 schwarze Exp $ */ +/* $Id: man_term.c,v 1.211 2018/06/10 15:12:35 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2015, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org> @@ -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); } |