summaryrefslogtreecommitdiff
path: root/src/mbyte.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-05-19 21:00:46 +0000
committerBram Moolenaar <Bram@vim.org>2005-05-19 21:00:46 +0000
commit051b782fa0ed834d7b4f80e5f1540d4d96e5f9d7 (patch)
treeeadaef546274775aaa08c66865db80b33e98abdb /src/mbyte.c
parent9c13b359b496c5268702776105a9f87b269e84f3 (diff)
downloadvim-git-051b782fa0ed834d7b4f80e5f1540d4d96e5f9d7.tar.gz
updated for version 7.0073
Diffstat (limited to 'src/mbyte.c')
-rw-r--r--src/mbyte.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mbyte.c b/src/mbyte.c
index c77178862..3a8b5584c 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -2255,6 +2255,7 @@ mb_strnicmp(s1, s2, n)
show_utf8()
{
int len;
+ int rlen = 0;
char_u *line;
int clen;
int i;
@@ -2269,7 +2270,6 @@ show_utf8()
return;
}
- IObuff[0] = NUL;
clen = 0;
for (i = 0; i < len; ++i)
{
@@ -2277,11 +2277,17 @@ show_utf8()
{
/* start of (composing) character, get its length */
if (i > 0)
- STRCAT(IObuff, "+ ");
+ {
+ STRCPY(IObuff + rlen, "+ ");
+ rlen += 2;
+ }
clen = utf_ptr2len_check(line + i);
}
- sprintf((char *)IObuff + STRLEN(IObuff), "%02x ", line[i]);
+ sprintf((char *)IObuff + rlen, "%02x ", line[i]);
--clen;
+ rlen += STRLEN(IObuff + rlen);
+ if (rlen > IOSIZE - 20)
+ break;
}
msg(IObuff);