summaryrefslogtreecommitdiffstats
path: root/term.c
diff options
context:
space:
mode:
Diffstat (limited to 'term.c')
-rw-r--r--term.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/term.c b/term.c
index 8f395a9e..97f6d2bc 100644
--- a/term.c
+++ b/term.c
@@ -468,9 +468,8 @@ term_word(struct termp *p, const char *word)
encode(p, cp, ssz);
} else {
uc = mchars_spec2cp(p->symtab, seq, sz);
- if (uc <= 0)
- uc = 0xFFFD;
- encode1(p, uc);
+ if (uc > 0)
+ encode1(p, uc);
}
break;
case ESCAPE_FONTBOLD:
@@ -705,9 +704,8 @@ term_strlen(const struct termp *p, const char *cp)
} else {
c = mchars_spec2cp(p->symtab,
seq, ssz);
- if (c <= 0)
- c = 0xFFFD;
- sz += cond_width(p, c, &skip);
+ if (c > 0)
+ sz += cond_width(p, c, &skip);
}
break;
case ESCAPE_SKIPCHAR: