Created
January 13, 2009 11:03
-
-
Save mattn/46405 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: src/term.c | |
=================================================================== | |
--- src/term.c (revision 1318) | |
+++ src/term.c (working copy) | |
@@ -5152,7 +5152,7 @@ | |
#ifdef FEAT_MBYTE | |
/* skip multibyte char correctly */ | |
- for (i = (*mb_ptr2len)(src); i > 0; --i) | |
+ if ((i = (*mb_ptr2len)(src)) == 1) | |
#endif | |
{ | |
/* | |
@@ -5177,7 +5177,13 @@ | |
else | |
result[dlen++] = *src; | |
++src; | |
+#ifdef FEAT_MBYTE | |
+ } else { | |
+ mch_memmove(result + dlen, src, i); | |
+ dlen += i; | |
+ src += i; | |
} | |
+#endif | |
} | |
result[dlen] = NUL; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment