summaryrefslogtreecommitdiffstats
path: root/mdoc_macro.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdoc_macro.c')
-rw-r--r--mdoc_macro.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c
index 61ca534a..fd3f8764 100644
--- a/mdoc_macro.c
+++ b/mdoc_macro.c
@@ -561,6 +561,9 @@ rew_sub(enum mdoc_type t, struct mdoc *mdoc,
case (REWIND_NONE):
return(1);
case (REWIND_THIS):
+ n->lastline = line -
+ (MDOC_NEWLINE & mdoc->flags &&
+ ! (MDOC_EXPLICIT & mdoc_macros[tok].flags));
break;
case (REWIND_FORCE):
mandoc_vmsg(MANDOCERR_SCOPEBROKEN, mdoc->parse,
@@ -569,6 +572,8 @@ rew_sub(enum mdoc_type t, struct mdoc *mdoc,
mdoc_macronames[n->tok]);
/* FALLTHROUGH */
case (REWIND_MORE):
+ n->lastline = line -
+ (MDOC_NEWLINE & mdoc->flags ? 1 : 0);
n = n->parent;
continue;
case (REWIND_LATER):