summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2010-07-16 00:03:29 +0000
committerschwarze <schwarze@openbsd.org>2010-07-16 00:03:29 +0000
commitc899fd96cfcc21322834df76b43cbdcee7b0fe5a (patch)
tree8cade583cbe57892c479cae7f817c0028fdd5453
parentwhen mpii(4) gets an async event (ie, sas topology change or (diff)
downloadwireguard-openbsd-c899fd96cfcc21322834df76b43cbdcee7b0fe5a.tar.xz
wireguard-openbsd-c899fd96cfcc21322834df76b43cbdcee7b0fe5a.zip
After .Sm on, spacing ought to restart right away, before the next token,
and not with a delay, after the next token. But be careful not to cause leading white space at the beginning of a line or column. Improves chmod(1), ksh(1), tar(1), ps(1) and probably many more. ok kristaps@ jmc@ sobrado@
-rw-r--r--usr.bin/mandoc/mdoc_term.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/mandoc/mdoc_term.c b/usr.bin/mandoc/mdoc_term.c
index acb170d2382..1e7eb9fdd9c 100644
--- a/usr.bin/mandoc/mdoc_term.c
+++ b/usr.bin/mandoc/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.95 2010/07/13 01:09:13 schwarze Exp $ */
+/* $Id: mdoc_term.c,v 1.96 2010/07/16 00:03:29 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -2062,9 +2062,11 @@ termp_sm_pre(DECL_ARGS)
{
assert(n->child && MDOC_TEXT == n->child->type);
- if (0 == strcmp("on", n->child->string))
+ if (0 == strcmp("on", n->child->string)) {
+ if (p->col)
+ p->flags &= ~TERMP_NOSPACE;
p->flags &= ~TERMP_NONOSPACE;
- else
+ } else
p->flags |= TERMP_NONOSPACE;
return(0);