diff options
author | ed <ed@FreeBSD.org> | 2009-09-12 10:34:34 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2009-09-12 10:34:34 +0000 |
commit | 5e016d112434ef187468b8a8166e7872fbc23ab6 (patch) | |
tree | 25635bc8861ac3c83804ded5eec7f84c71cff377 /sys/teken/teken_subr.h | |
parent | a0b9f3abc074f1c338f59da8eb7b4bad3f3035da (diff) | |
download | FreeBSD-src-5e016d112434ef187468b8a8166e7872fbc23ab6.zip FreeBSD-src-5e016d112434ef187468b8a8166e7872fbc23ab6.tar.gz |
Make 8-bit support run-time configurable.
Now to do the same for xterm support. This means people can eventually
toy around with xterm+UTF-8 without recompiling their kernel.
Diffstat (limited to 'sys/teken/teken_subr.h')
-rw-r--r-- | sys/teken/teken_subr.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/sys/teken/teken_subr.h b/sys/teken/teken_subr.h index 38a29ee..0ba531d 100644 --- a/sys/teken/teken_subr.h +++ b/sys/teken/teken_subr.h @@ -786,13 +786,20 @@ static void teken_subr_regular_character(teken_t *t, teken_char_t c) { int width; - - c = teken_scs_process(t, c); - /* XXX: Don't process zero-width characters yet. */ - width = teken_wcwidth(c); - if (width <= 0) - return; + if (t->t_utf8_left == -1) { +#ifdef TEKEN_XTERM + if (c <= 0x1B) + return; +#endif /* TEKEN_XTERM */ + width = 1; + } else { + c = teken_scs_process(t, c); + width = teken_wcwidth(c); + /* XXX: Don't process zero-width characters yet. */ + if (width <= 0) + return; + } #ifdef TEKEN_XTERM if (t->t_cursor.tp_col == t->t_winsize.tp_col - 1 && |