diff options
-rw-r--r-- | pttbbs/mbbsd/screen.c | 12 | ||||
-rw-r--r-- | pttbbs/mbbsd/vtuikit.c | 6 |
2 files changed, 10 insertions, 8 deletions
diff --git a/pttbbs/mbbsd/screen.c b/pttbbs/mbbsd/screen.c index 1389afd9..74d0f755 100644 --- a/pttbbs/mbbsd/screen.c +++ b/pttbbs/mbbsd/screen.c @@ -348,14 +348,14 @@ doupdate(void) } #endif // DBCSAWARE -#if 0 - // disabled now, bugs: - // (1) input number (goto) in bbs list (search_num) - // (2) some empty lines becomes weird (eg, b_config) - // - // more effort to determine ANSI smod +// disable this if you encounter some bugs. +// bug history: +// (1) input number (goto) in bbs list (search_num) [solved: search_num merged to vget] +// (2) some empty lines becomes weird (eg, b_config) [not seen anymore?] +#if 1 if (bp->smod > 0) { + // more effort to determine ANSI smod int iesc; for (iesc = bp->smod-1; iesc >= 0; iesc--) { diff --git a/pttbbs/mbbsd/vtuikit.c b/pttbbs/mbbsd/vtuikit.c index 351c3d4e..32c00a41 100644 --- a/pttbbs/mbbsd/vtuikit.c +++ b/pttbbs/mbbsd/vtuikit.c @@ -970,7 +970,7 @@ vgetstring(char *_buf, int len, int flags, const char *defstr, const VGET_CALLBA { // rt.iend points to NUL address, and // rt.icurr points to cursor. - int line, col; + int line, col, line_ansi, col_ansi; int abort = 0, dirty = 0; int c = 0; char ismsgline = 0; @@ -1007,6 +1007,7 @@ vgetstring(char *_buf, int len, int flags, const char *defstr, const VGET_CALLBA cb = *pcbs; getyx(&line, &col); // now (line,col) is the beginning of our new fields. + getyx_ansi(&line_ansi, &col_ansi); // XXX be compatible with traditional... if (line == b_lines - msg_occupied) @@ -1034,6 +1035,7 @@ vgetstring(char *_buf, int len, int flags, const char *defstr, const VGET_CALLBA // print current buffer move(line, col); + SOLVE_ANSI_CACHE(); clrtoeol(); SOLVE_ANSI_CACHE(); @@ -1046,7 +1048,7 @@ vgetstring(char *_buf, int len, int flags, const char *defstr, const VGET_CALLBA outs(ANSI_RESET); // move to cursor position - move(line, col+rt.icurr); + move(line_ansi, col_ansi+rt.icurr); } else { // to simulate the "clrtoeol" behavior... // XXX make this call only once? or not? |