From 7edb40db8a41a1e42ee326feaea1aa99d199eb6e Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 16 Nov 2018 13:51:38 -0800 Subject: [PATCH] ascii: Update min_breaks along with width and length. min_breaks has to be no larger than the page width (or length), otherwise the rendering algorithm fails, but the automatic update for TTYs didn't take that into account. --- src/output/ascii.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/output/ascii.c b/src/output/ascii.c index d7ec317d70..db75e69630 100644 --- a/src/output/ascii.c +++ b/src/output/ascii.c @@ -354,9 +354,15 @@ update_page_size (struct ascii_driver *a, bool issue_error) enum { MIN_WIDTH = 6, MIN_LENGTH = 6 }; if (a->auto_width) - a->width = settings_get_viewwidth (); + { + a->width = settings_get_viewwidth (); + a->min_break[H] = a->width / 2; + } if (a->auto_length) - a->length = settings_get_viewlength () - vertical_margins (a); + { + a->length = settings_get_viewlength () - vertical_margins (a); + a->min_break[V] = a->length / 2; + } if (a->width < MIN_WIDTH || a->length < MIN_LENGTH) { -- 2.30.2