From 8940f8ec2a3521d00a45b25c5d1f556894549408 Mon Sep 17 00:00:00 2001 From: schwarze Date: Fri, 26 Sep 2025 12:13:24 +0000 Subject: [PATCH] Catch up with the new visual column width handling in term_ascii.c rev. 1.57. Ending the column always needs to reset viscol now, even while preparing the top and bottom margin lines. This fixes broken horizontal spacing in the bottom margin. Regression reported by in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289786 . --- usr.bin/mandoc/term_ps.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/mandoc/term_ps.c b/usr.bin/mandoc/term_ps.c index 30e7e25b12e..f175fb5b9de 100644 --- a/usr.bin/mandoc/term_ps.c +++ b/usr.bin/mandoc/term_ps.c @@ -1,4 +1,4 @@ -/* $OpenBSD: term_ps.c,v 1.58 2025/07/18 15:46:58 schwarze Exp $ */ +/* $OpenBSD: term_ps.c,v 1.59 2025/09/26 12:13:24 schwarze Exp $ */ /* * Copyright (c) 2014-2017, 2020, 2025 Ingo Schwarze * Copyright (c) 2010, 2011 Kristaps Dzonsons @@ -1218,6 +1218,8 @@ ps_endline(struct termp *p) ps_plast(p); ps_pclose(p); + p->viscol = 0; + p->minbl = 0; /* * If we're in the margin, don't try to recalculate our current @@ -1231,8 +1233,6 @@ ps_endline(struct termp *p) /* Left-justify. */ p->ps->pscol = p->ps->left; - p->viscol = 0; - p->minbl = 0; /* If we haven't printed anything, return. */