summaryrefslogtreecommitdiffstats
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
commitaebdcef58e30d0ed35533f2cd4165612d8571e7e (patch)
treea053e603cfe74bddce62b2a8a93675ee37395eff /term.c
parent469dda9abe8e2d5ff08ae7d632dad0b4a59a2d49 (diff)
downloadmandoc-aebdcef58e30d0ed35533f2cd4165612d8571e7e.tar.gz
Fix in nospace following close-delimiter.
Diffstat (limited to 'term.c')
-rw-r--r--term.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/term.c b/term.c
index ffb18246..63772132 100644
--- a/term.c
+++ b/term.c
@@ -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;
}