diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-03-06 23:29:24 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-03-06 23:29:24 +0000 |
commit | 362e1a30c6f3527d5d0efc328c2fb448290cd6fc (patch) | |
tree | 91c408352947bec09aee2032949ef1acef606d15 /src/ex_cmds.c | |
parent | 768b8c4dbcb3cdaccab87daa833ab176a438cc3c (diff) |
updated for version 7.0216v7.0216
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r-- | src/ex_cmds.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 71766b910d..22bbd45dda 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -52,12 +52,12 @@ do_ascii(eap) char buf2[20]; char_u buf3[7]; #ifdef FEAT_MBYTE - int c1 = 0; - int c2 = 0; + int cc[MAX_MCO]; + int ci = 0; int len; if (enc_utf8) - c = utfc_ptr2char(ml_get_cursor(), &c1, &c2); + c = utfc_ptr2char(ml_get_cursor(), cc); else #endif c = gchar_cursor(); @@ -95,9 +95,7 @@ do_ascii(eap) _("<%s>%s%s %d, Hex %02x, Octal %03o"), transchar(c), buf1, buf2, c, c, c); #ifdef FEAT_MBYTE - c = c1; - c1 = c2; - c2 = 0; + c = cc[ci++]; #endif } @@ -120,9 +118,9 @@ do_ascii(eap) vim_snprintf((char *)IObuff + len, IOSIZE - len, c < 0x10000 ? _("> %d, Hex %04x, Octal %o") : _("> %d, Hex %08x, Octal %o"), c, c, c); - c = c1; - c1 = c2; - c2 = 0; + if (ci == MAX_MCO) + break; + c = cc[ci++]; } #endif |