diff options
author | Ed Schouten <ed@FreeBSD.org> | 2009-09-12 10:34:34 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2009-09-12 10:34:34 +0000 |
commit | e06d84fc491d9330288fdd9b63a8de525a8d2a8a (patch) | |
tree | 25635bc8861ac3c83804ded5eec7f84c71cff377 /sys/teken/teken_subr.h | |
parent | b03552b5e251b66ff7685abe65c6e4c6256c923b (diff) | |
download | src-e06d84fc491d9330288fdd9b63a8de525a8d2a8a.tar.gz src-e06d84fc491d9330288fdd9b63a8de525a8d2a8a.zip |
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.
Notes
Notes:
svn path=/head/; revision=197115
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 38a29ee1ed21..0ba531dbaafd 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 && |