From f55eaef82ab265772418a545f32fa2780468603b Mon Sep 17 00:00:00 2001 From: piaip Date: Wed, 8 Jun 2005 02:27:22 +0000 Subject: bug fix for dbcs aware ve by Michael Hsin (mhsin), thanks! git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2795 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/edit.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mbbsd/edit.c b/mbbsd/edit.c index c0bab9c4..47fcece7 100644 --- a/mbbsd/edit.c +++ b/mbbsd/edit.c @@ -2832,12 +2832,12 @@ vedit(char *fpath, int saveheader, int *islocal) if (curr_buf->ansimode) curr_buf->currpnt = n2ansi(curr_buf->currpnt, curr_buf->currline); curr_buf->currpnt--; + if (curr_buf->ansimode) + curr_buf->currpnt = ansi2n(curr_buf->currpnt, curr_buf->currline); #ifdef DBCSAWARE_EDIT if(mbcs_mode) curr_buf->currpnt = fix_cursor(curr_buf->currline->data, curr_buf->currpnt, FC_LEFT); #endif - if (curr_buf->ansimode) - curr_buf->currpnt = ansi2n(curr_buf->currpnt, curr_buf->currline); } else if (curr_buf->currline->prev) { curr_buf->curr_window_line--; curr_buf->currln--; @@ -2850,12 +2850,12 @@ vedit(char *fpath, int saveheader, int *islocal) if (curr_buf->ansimode) curr_buf->currpnt = n2ansi(curr_buf->currpnt, curr_buf->currline); curr_buf->currpnt++; + if (curr_buf->ansimode) + curr_buf->currpnt = ansi2n(curr_buf->currpnt, curr_buf->currline); #ifdef DBCSAWARE_EDIT if(mbcs_mode) curr_buf->currpnt = fix_cursor(curr_buf->currline->data, curr_buf->currpnt, FC_RIGHT); #endif - if (curr_buf->ansimode) - curr_buf->currpnt = ansi2n(curr_buf->currpnt, curr_buf->currline); } else if (curr_buf->currline->next) { curr_buf->currpnt = 0; curr_buf->curr_window_line++; -- cgit v1.2.3