From 8e9a700f6c3099ee1339933226c37abe1aabedd9 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 16 Jul 2010 00:03:37 +0000 Subject: 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. In OpenBSD, improves chmod(1), ksh(1), tar(1), ps(1) and probably many more. ok kristaps@ and tested by jmc@ and sobrado@ --- mdoc_term.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'mdoc_term.c') diff --git a/mdoc_term.c b/mdoc_term.c index 978b317c..117ac1e1 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -2066,9 +2066,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); -- cgit