From 368eacd6aeb9b724a7361289892efe34491b54b5 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Tue, 16 Aug 2022 17:45:55 +0000 Subject: When starting a new input line, even when continuing the same output line, use the current output position as the reference position for tabs on that input line. This brings mandoc in line with the behaviour of GNU, Heirloom, and Plan 9 roff. --- man_term.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'man_term.c') diff --git a/man_term.c b/man_term.c index b5e0da70..33431749 100644 --- a/man_term.c +++ b/man_term.c @@ -910,8 +910,11 @@ print_man_node(DECL_ARGS) (p->flags & TERMP_NONEWLINE) == 0) term_newln(p); p->flags |= TERMP_BRNEVER; - } else + } else { + if (n->flags & NODE_LINE) + term_tab_ref(p); p->flags &= ~TERMP_BRNEVER; + } if (n->flags & NODE_ID) term_tag_write(n, p->line); -- cgit