From 004600a2395ed65e96b46c38e3b9d68ac0277ddb Mon Sep 17 00:00:00 2001 From: schwarze Date: Sun, 28 Aug 2022 09:55:58 +0000 Subject: [PATCH] Stop unconditionally emitting vertical space before .TS (table start). Same change as in groff commit 7ec36dc9 Jul 30 2022 gbranden@ For more details, see https://savannah.gnu.org/bugs/index.php?62841 This change makes sense because: * It improves the formatting of more pages than it degrades. * Existing manual pages are wildly inconsistent in which behaviour they expect: apparently few manual page authors understood the old rules. * It simplifies the rules of how .TS behaves in man(7) and makes them more similar to how it behaves in mdoc(7). * It improves flexibility, making it possible for a table to immediately follow preceding text without a blank line, which some existing pages want to use, for example XCreateWindow(3). --- usr.bin/mandoc/man_term.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/mandoc/man_term.c b/usr.bin/mandoc/man_term.c index 2ab9f780e5c..10fc859a4fd 100644 --- a/usr.bin/mandoc/man_term.c +++ b/usr.bin/mandoc/man_term.c @@ -1,4 +1,4 @@ -/* $OpenBSD: man_term.c,v 1.193 2022/08/16 17:44:53 schwarze Exp $ */ +/* $OpenBSD: man_term.c,v 1.194 2022/08/28 09:55:58 schwarze Exp $ */ /* * Copyright (c) 2010-2015,2017-2020,2022 Ingo Schwarze * Copyright (c) 2008-2012 Kristaps Dzonsons @@ -949,7 +949,7 @@ print_man_node(DECL_ARGS) return; case ROFFT_TBL: if (p->tbl.cols == NULL) - term_vspace(p); + term_newln(p); term_tbl(p, n->span); return; default: -- 2.20.1