summaryrefslogtreecommitdiffstats
path: root/term.c
diff options
context:
space:
mode:
Diffstat (limited to 'term.c')
-rw-r--r--term.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/term.c b/term.c
index cf068e44..bdd3d38c 100644
--- a/term.c
+++ b/term.c
@@ -445,12 +445,17 @@ term_word(struct termp *p, const char *word)
break;
}
- if ( ! (TERMP_NOSPACE & p->flags))
+ if ( ! (TERMP_NOSPACE & p->flags)) {
bufferc(p, ' ');
+ if (TERMP_SENTENCE & p->flags)
+ bufferc(p, ' ');
+ }
if ( ! (p->flags & TERMP_NONOSPACE))
p->flags &= ~TERMP_NOSPACE;
+ p->flags &= ~TERMP_SENTENCE;
+
/* FIXME: use strcspn. */
while (*word) {