diff options
-rw-r--r-- | regress/usr.bin/mandoc/char/space/tab.in | 21 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/char/space/tab.out_ascii | 20 | ||||
-rw-r--r-- | usr.bin/mandoc/mdoc_term.c | 6 |
3 files changed, 45 insertions, 2 deletions
diff --git a/regress/usr.bin/mandoc/char/space/tab.in b/regress/usr.bin/mandoc/char/space/tab.in index 6bf6335853d..ef123bf4503 100644 --- a/regress/usr.bin/mandoc/char/space/tab.in +++ b/regress/usr.bin/mandoc/char/space/tab.in @@ -81,6 +81,27 @@ space tab .br tab .Ed +unfilled display +.Bd -unfilled -offset 2n +1 x +22 x +333 x +4444 x +55555 x +666666 x +7777777 x +88888888 x +999999999 x +aaaaaaaaaa x +bbbbbbbbbbb x +cccccccccccc x +ddddddddddddd x +tab space +tab tab +space tab + tab + tab +.Ed literal display .Bd -literal -offset 2n 1 x diff --git a/regress/usr.bin/mandoc/char/space/tab.out_ascii b/regress/usr.bin/mandoc/char/space/tab.out_ascii index f7c32968ea6..a930bd76900 100644 --- a/regress/usr.bin/mandoc/char/space/tab.out_ascii +++ b/regress/usr.bin/mandoc/char/space/tab.out_ascii @@ -43,6 +43,26 @@ DDEESSCCRRIIPPTTIIOONN space tab tab tab + unfilled display + + 1 x + 22 x + 333 x + 4444 x + 55555 x + 666666 x + 7777777 x + 88888888 x + 999999999 x + aaaaaaaaaa x + bbbbbbbbbbb x + cccccccccccc x + ddddddddddddd x + tab space + tab tab + space tab + tab + tab literal display 1 x diff --git a/usr.bin/mandoc/mdoc_term.c b/usr.bin/mandoc/mdoc_term.c index b97de215fc6..0ab17e294c2 100644 --- a/usr.bin/mandoc/mdoc_term.c +++ b/usr.bin/mandoc/mdoc_term.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.122 2011/01/04 22:28:17 schwarze Exp $ */ +/* $Id: mdoc_term.c,v 1.123 2011/01/09 16:09:41 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org> @@ -1595,7 +1595,9 @@ termp_bd_pre(DECL_ARGS) return(1); tabwidth = p->tabwidth; - p->tabwidth = term_len(p, 8); + if (DISP_literal == n->norm->Bd.type) + p->tabwidth = term_len(p, 8); + rm = p->rmargin; rmax = p->maxrmargin; p->rmargin = p->maxrmargin = TERM_MAXMARGIN; |