From d5b0e951bf94137fb984c32dbff43b42eb63c40d Mon Sep 17 00:00:00 2001 From: schwarze Date: Fri, 1 May 2015 15:27:17 +0000 Subject: [PATCH] Minor bug fix: When .Pp rewinds .Nm, rewind the whole block, not just the body. In some unusual edge cases, this caused the .Pp to become a sibling of the .Nm body inside the .Nm block. --- usr.bin/mandoc/mdoc_macro.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/mandoc/mdoc_macro.c b/usr.bin/mandoc/mdoc_macro.c index 1e37532b2c6..fb33821ae94 100644 --- a/usr.bin/mandoc/mdoc_macro.c +++ b/usr.bin/mandoc/mdoc_macro.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mdoc_macro.c,v 1.153 2015/04/29 21:57:50 schwarze Exp $ */ +/* $OpenBSD: mdoc_macro.c,v 1.154 2015/05/01 15:27:17 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010, 2012-2015 Ingo Schwarze @@ -1397,7 +1397,7 @@ in_line_eoln(MACRO_PROT_ARGS) if (mdoc->next == ROFF_NEXT_SIBLING) n = n->parent; if (n->tok == MDOC_Nm) - rew_last(mdoc, mdoc->last->parent); + rew_last(mdoc, n->parent); } if (buf[*pos] == '\0' && -- 2.20.1