diff options
Diffstat (limited to 'term.c')
-rw-r--r-- | term.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -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: |