summaryrefslogtreecommitdiffstatshomepage
path: root/term.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-07-16 12:34:06 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-07-16 12:34:06 +0000
commitfc215c3578c271c66987bbd05025602ef9306f33 (patch)
tree00e1b6f2878ff1e8d384f8aa7694e4c056d99557 /term.c
parenta03ada82544c8419c243f11f16b3aefd27e3e577 (diff)
downloadmandoc-fc215c3578c271c66987bbd05025602ef9306f33.tar.gz
mandoc-fc215c3578c271c66987bbd05025602ef9306f33.tar.zst
mandoc-fc215c3578c271c66987bbd05025602ef9306f33.zip
Fix in nospace following close-delimiter.
Diffstat (limited to 'term.c')
-rw-r--r--term.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/term.c b/term.c
index 066013d6..0bb24de0 100644
--- a/term.c
+++ b/term.c
@@ -1,4 +1,4 @@
-/* $Id: term.c,v 1.87 2009/07/15 15:53:57 kristaps Exp $ */
+/* $Id: term.c,v 1.88 2009/07/16 12:34:06 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -495,6 +495,7 @@ term_pescape(struct termp *p, const char **word)
void
term_word(struct termp *p, const char *word)
{
+ const char *sv;
if (term_isclosedelim(word))
if ( ! (TERMP_IGNDELIM & p->flags))
@@ -511,13 +512,13 @@ term_word(struct termp *p, const char *word)
* before the word.
*/
- for ( ; *word; word++)
+ for (sv = word; *word; word++)
if ('\\' != *word)
term_encodea(p, *word);
else
term_pescape(p, &word);
- if (term_isopendelim(word))
+ if (term_isopendelim(sv))
p->flags |= TERMP_NOSPACE;
}