aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-05-01 15:27:54 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-05-01 15:27:54 +0000
commit5d1129d2c6fc8ebde31436a6426534bcd634668d (patch)
tree090e0f9d343c8b79ea33a62913c14733281c90f6
parent9164c82e687add97a231fc5a864f5c8f4a6cc381 (diff)
downloadmandoc-5d1129d2c6fc8ebde31436a6426534bcd634668d.tar.gz
mandoc-5d1129d2c6fc8ebde31436a6426534bcd634668d.tar.zst
mandoc-5d1129d2c6fc8ebde31436a6426534bcd634668d.zip
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.
-rw-r--r--mdoc_macro.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c
index 493ed8d0..236e63e9 100644
--- a/mdoc_macro.c
+++ b/mdoc_macro.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_macro.c,v 1.197 2015/04/29 21:58:32 schwarze Exp $ */
+/* $Id: mdoc_macro.c,v 1.198 2015/05/01 15:27:54 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012-2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -1399,7 +1399,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' &&