From 54a043ffd13f3d896b58c6a9f0a4a5bb2170b9ab Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 21:38:58 +0200 Subject: Merging upstream version 2.12.1. Signed-off-by: Daniel Baumann --- src/man.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/man.c') diff --git a/src/man.c b/src/man.c index 5d3be39..195d35d 100644 --- a/src/man.c +++ b/src/man.c @@ -685,13 +685,11 @@ static int get_roff_line_length (void) { int line_length = cat_width ? cat_width : get_line_length (); - if (!troff || ditroff) { - int length = line_length * 39 / 40; - if (length > line_length - 2) - return line_length - 2; - else - return length; - } else + if (!troff || ditroff) + /* groff ≤1.23 tbl often overflows the page width by 1 column: + * let it do so without mangling the output completely. */ + return line_length - 1; + else return 0; } -- cgit v1.2.3