diff options
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/screen.c | 28 | ||||
-rw-r--r-- | mbbsd/user.c | 2 |
2 files changed, 28 insertions, 2 deletions
diff --git a/mbbsd/screen.c b/mbbsd/screen.c index 8256ba5e..59e0addb 100644 --- a/mbbsd/screen.c +++ b/mbbsd/screen.c @@ -121,7 +121,8 @@ void redoscr(void) { register screenline_t *bp; - register int i, j, len; + register int i, j; + int len; o_clear(); for (tc_col = tc_line = i = 0, j = roll; i < scr_lns; i++, j++) { @@ -130,6 +131,17 @@ redoscr(void) bp = &big_picture[j]; if ((len = bp->len)) { rel_move(tc_col, tc_line, 0, i); + +#ifdef DBCSAWARE + if (!(bp->mode & STANDOUT) && + (cuser.uflag & DBCS_NOINTRESC) && + DBCS_RemoveIntrEscape(bp->data, &len)) + { + // if anything changed, dirty whole line. + bp->len = len; + } +#endif // DBCSAWARE + if (bp->mode & STANDOUT) { standoutput((char *)bp->data, 0, len, bp->sso, bp->eso); } @@ -188,7 +200,8 @@ refresh(void) { /* TODO remove unnecessary refresh() call, to save CPU time */ register screenline_t *bp = big_picture; - register int i, j, len; + register int i, j; + int len; if (num_in_buf()) return; @@ -221,6 +234,17 @@ refresh(void) { bp->mode &= ~(MODIFIED); +#ifdef DBCSAWARE + if (!(bp->mode & STANDOUT) && + (cuser.uflag & DBCS_NOINTRESC) && + DBCS_RemoveIntrEscape(bp->data, &len)) + { + // if anything changed, dirty whole line. + bp->len = len; + bp->smod = 0; bp->emod = len; + } +#endif // DBCSAWARE + // more effort to determine ANSI smod if (bp->smod > 0) { diff --git a/mbbsd/user.c b/mbbsd/user.c index f2475e95..05289ef6 100644 --- a/mbbsd/user.c +++ b/mbbsd/user.c @@ -335,6 +335,7 @@ void Customize(void) COLORED_MODMARK, #ifdef DBCSAWARE DBCSAWARE_FLAG, + DBCS_NOINTRESC, #endif 0, }; @@ -345,6 +346,7 @@ void Customize(void) "改用色彩代替修改符號 (+)", #ifdef DBCSAWARE "自動偵測雙位元字集(如全型中文)", + "禁止插入雙位元的色碼(一字雙色)", #endif 0, }; |