aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2013-05-29 15:17:52 +0000
committerIngo Schwarze <schwarze@openbsd.org>2013-05-29 15:17:52 +0000
commit54f2a620ef81531e9476ec8df569f6d85f8d375a (patch)
treebd5f6824a59d6b61ebe826f6469460530cc75095 /term.c
parentf802a5ea1ad00140c792ac2914dfcdea4a48640e (diff)
downloadmandoc-54f2a620ef81531e9476ec8df569f6d85f8d375a.tar.gz
mandoc-54f2a620ef81531e9476ec8df569f6d85f8d375a.tar.zst
mandoc-54f2a620ef81531e9476ec8df569f6d85f8d375a.zip
In keep mode, if any text is printed (even in NOSPACE mode),
any text that follows must be kept on the same line. I already found the issue and wrote the patch in April 2011, but didn't come round to do proper testing and forgot about it.
Diffstat (limited to 'term.c')
-rw-r--r--term.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/term.c b/term.c
index 62290312..44973491 100644
--- a/term.c
+++ b/term.c
@@ -1,4 +1,4 @@
-/* $Id: term.c,v 1.206 2012/11/16 17:16:55 schwarze Exp $ */
+/* $Id: term.c,v 1.207 2013/05/29 15:17:52 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2011, 2012 Ingo Schwarze <schwarze@openbsd.org>
@@ -406,14 +406,14 @@ term_word(struct termp *p, const char *word)
if ( ! (TERMP_NOSPACE & p->flags)) {
if ( ! (TERMP_KEEP & p->flags)) {
- if (TERMP_PREKEEP & p->flags)
- p->flags |= TERMP_KEEP;
bufferc(p, ' ');
if (TERMP_SENTENCE & p->flags)
bufferc(p, ' ');
} else
bufferc(p, ASCII_NBRSP);
}
+ if (TERMP_PREKEEP & p->flags)
+ p->flags |= TERMP_KEEP;
if ( ! (p->flags & TERMP_NONOSPACE))
p->flags &= ~TERMP_NOSPACE;