summaryrefslogtreecommitdiffstats
path: root/man_term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2022-08-15 13:04:43 +0000
committerIngo Schwarze <schwarze@openbsd.org>2022-08-15 13:04:43 +0000
commitffa876e5886e09f94c3fe78fbef3cc7ebcd8a611 (patch)
treed6755f20efaea5d5571591b525c8bde74110b328 /man_term.c
parentb8c2ddec80f36a42b137370c233bb4a858567168 (diff)
downloadmandoc-ffa876e5886e09f94c3fe78fbef3cc7ebcd8a611.tar.gz
In GNU, Heirloom, and Plan 9 roff, tab positions apply to *input* lines,
not to *output* lines. In particular, if an input line gets broken in fill mode and a tab occurs in the second output line, it advances to a position of at least (width of the first output line) + (width of a space character even though this is never printed) + (width of the part of the second output line that precedes the tab). Implement the same logic in mandoc. Again, do not use tabs in filled text: they have surprising effects, including this one.
Diffstat (limited to 'man_term.c')
-rw-r--r--man_term.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/man_term.c b/man_term.c
index 10cac3b4..178b30e4 100644
--- a/man_term.c
+++ b/man_term.c
@@ -975,6 +975,7 @@ out:
! (p->flags & (TERMP_NOBREAK | TERMP_NONEWLINE)) &&
(n->next == NULL || n->next->flags & NODE_LINE)) {
p->flags |= TERMP_BRNEVER | TERMP_NOSPACE;
+ p->tcol->taboff = 0;
if (n->string != NULL && *n->string != '\0')
term_flushln(p);
else