diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2012-04-11 09:26:58 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2012-04-11 09:26:58 +0800 |
commit | f65b64fbeeac472819306186c75c23c81dd5cda6 (patch) | |
tree | 96af2930fe35bde0e0e4c09304bdb98b2be963c4 | |
parent | e76242d1f47cd5822d40bb46ba6206eb43d9552d (diff) | |
download | pttbbs-f65b64fbeeac472819306186c75c23c81dd5cda6.tar pttbbs-f65b64fbeeac472819306186c75c23c81dd5cda6.tar.gz pttbbs-f65b64fbeeac472819306186c75c23c81dd5cda6.tar.bz2 pttbbs-f65b64fbeeac472819306186c75c23c81dd5cda6.tar.lz pttbbs-f65b64fbeeac472819306186c75c23c81dd5cda6.tar.xz pttbbs-f65b64fbeeac472819306186c75c23c81dd5cda6.tar.zst pttbbs-f65b64fbeeac472819306186c75c23c81dd5cda6.zip |
Support ESC Hack in a better way - not enabled by default.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5618 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/mbbsd/screen.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/pttbbs/mbbsd/screen.c b/pttbbs/mbbsd/screen.c index 98352e0d..b03dd784 100644 --- a/pttbbs/mbbsd/screen.c +++ b/pttbbs/mbbsd/screen.c @@ -545,10 +545,11 @@ outc(unsigned char c) // Escape processing is a mess here. If we don't always invalid ESC, // attributes will be not updated if some ouptut generates ESC on same - // position; if we do that, cross-line outputs also corrupted, or more: - // #1FX6qLcO (PttCurrent). This has been turned on/off several times - and - // I still don't know how to make a perfect workaround. - // Well, we probably still need to call SOLVE_ANSI_CACHE everywhere... + // position (with extra '[m' on screen); if we do that, cross-line outputs + // also corrupted, or more: #1FX6qLcO (PttCurrent). This has been turned + // on/off several times - and I still don't know how to make a perfect + // workaround. Well, we probably still need to call SOLVE_ANSI_CACHE + // everywhere... if (slp->data[cur_col] != c) { slp->data[cur_col] = c; if (!(slp->mode & MODIFIED)) @@ -558,6 +559,15 @@ outc(unsigned char c) slp->emod = cur_col; if (cur_col < slp->smod) slp->smod = cur_col; +#ifdef USE_ESC_HACK + // TODO If anything before cur_col has ESCAPE or if c is the second byte + // of a DBCS, re-invalidate whole line. + for (i = 0; i < cur_col; i++) { + if (slp->data[i] != ESC_CHR) + continue; + slp->smod = 0; + } +#endif } if(cur_col < scr_cols) |