summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2020-03-19 12:21:37 +0000
committerIngo Schwarze <schwarze@openbsd.org>2020-03-19 12:21:37 +0000
commitadfe861feea336544648d5ca761511a928c2d564 (patch)
treef16eaacbf25d8fdcae9c83c58270b790258632a1
parentcbd66f9b4ea3a04b5f24ff52b4c7e425468a202b (diff)
downloadmandoc-adfe861feea336544648d5ca761511a928c2d564.tar.gz
The tag file always needs to be closed before starting the pager,
even when no output formatter was allocated because all pages shown were preformatted. Regression in previous reported by <Andreas dot Kahari at abc dot se> on bugs@.
-rw-r--r--main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.c b/main.c
index 9fb1726e..e3848843 100644
--- a/main.c
+++ b/main.c
@@ -609,6 +609,8 @@ main(int argc, char *argv[])
(void)fchdir(startdir);
close(startdir);
}
+ if (outst.outtype <= OUTT_UTF8)
+ term_tag_finish();
if (outst.outdata != NULL) {
switch (outst.outtype) {
case OUTT_HTML:
@@ -617,7 +619,6 @@ main(int argc, char *argv[])
case OUTT_UTF8:
case OUTT_LOCALE:
case OUTT_ASCII:
- term_tag_finish();
ascii_free(outst.outdata);
break;
case OUTT_PDF: