summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/mdoc.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2013-12-24 19:10:34 +0000
committerschwarze <schwarze@openbsd.org>2013-12-24 19:10:34 +0000
commitf7bdb1a2ed64b531d6a5bd917c4e67a96a4a362b (patch)
tree884a872fbfe02211be50d6591ea97992dd61fe95 /usr.bin/mandoc/mdoc.c
parentMore .Bk tests to lessen the risk of upcoming work. (diff)
downloadwireguard-openbsd-f7bdb1a2ed64b531d6a5bd917c4e67a96a4a362b.tar.xz
wireguard-openbsd-f7bdb1a2ed64b531d6a5bd917c4e67a96a4a362b.zip
When deciding whether two consecutive macros are on the same input line,
we have to compare the line where the first one *ends* (not where it begins) to the line where the second one starts. This fixes the bug that .Bk allowed output line breaks right after block macros spanning more than one input line, even when the next macro follows on the same line.
Diffstat (limited to 'usr.bin/mandoc/mdoc.c')
-rw-r--r--usr.bin/mandoc/mdoc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/mandoc/mdoc.c b/usr.bin/mandoc/mdoc.c
index 3464c0b48c2..6c8ad34b404 100644
--- a/usr.bin/mandoc/mdoc.c
+++ b/usr.bin/mandoc/mdoc.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc.c,v 1.95 2013/10/21 23:32:32 schwarze Exp $ */
+/* $Id: mdoc.c,v 1.96 2013/12/24 19:10:34 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012, 2013 Ingo Schwarze <schwarze@openbsd.org>
@@ -430,6 +430,7 @@ node_alloc(struct mdoc *mdoc, int line, int pos,
p->sec = mdoc->lastsec;
p->line = line;
p->pos = pos;
+ p->lastline = line;
p->tok = tok;
p->type = type;