From 22263071d729e5d19d22c171e8f31fa516fb4721 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sun, 19 Apr 2015 19:44:21 +0000 Subject: If an explicit line break request (.br or .sp) occurs within an .HP block, the next line doesn't hang, but is simply indented. Issue found by Christian Neukirchen in the dmsetup(8) manual on Linux. This patch also improves the indentation of XDGA(3) and XrmGetResource(3). --- man_term.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/man_term.c b/man_term.c index 2ab8ea3e..a79e5e27 100644 --- a/man_term.c +++ b/man_term.c @@ -1,4 +1,4 @@ -/* $Id: man_term.c,v 1.182 2015/04/19 14:00:19 schwarze Exp $ */ +/* $Id: man_term.c,v 1.183 2015/04/19 19:44:21 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010-2015 Ingo Schwarze @@ -482,6 +482,17 @@ pre_sp(DECL_ARGS) for (i = 0; i < len; i++) term_vspace(p); + /* + * Handle an explicit break request in the same way + * as an overflowing line. + */ + + if (p->flags & TERMP_BRIND) { + p->offset = p->rmargin; + p->rmargin = p->maxrmargin; + p->flags &= ~(TERMP_NOBREAK | TERMP_BRIND); + } + return(0); } -- cgit v1.2.3-56-ge451