diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2022-08-16 17:44:54 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2022-08-16 17:44:54 +0000 |
commit | f1a4bfe7aedae8d7e8777c9aaf8176f7731619b3 (patch) | |
tree | 354eed929cdff20c67c2875194f6394b5ad735c6 /usr.bin/mandoc/man_term.c | |
parent | 061e52ca23a19767789adf70d0effd6dd1e160be (diff) |
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.
Diffstat (limited to 'usr.bin/mandoc/man_term.c')
-rw-r--r-- | usr.bin/mandoc/man_term.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/mandoc/man_term.c b/usr.bin/mandoc/man_term.c index 2ca2533dfa6..2ab9f780e5c 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.192 2022/08/15 18:44:24 schwarze Exp $ */ +/* $OpenBSD: man_term.c,v 1.193 2022/08/16 17:44:53 schwarze Exp $ */ /* * Copyright (c) 2010-2015,2017-2020,2022 Ingo Schwarze <schwarze@openbsd.org> * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> @@ -908,8 +908,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); |