0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

updated for version 7.2a-006

This commit is contained in:
Bram Moolenaar 2008-06-28 11:03:50 +00:00
parent ed0e745361
commit b983921b0c
2 changed files with 9 additions and 5 deletions

View File

@ -449,13 +449,15 @@ str_foldcase(str, orglen, buf, buflen)
{ {
if (enc_utf8) if (enc_utf8)
{ {
int c, lc; int c = utf_ptr2char(STR_PTR(i));
int ol = utf_ptr2len(STR_PTR(i));
int lc = utf_tolower(c);
c = utf_ptr2char(STR_PTR(i)); /* Only replace the character when it is not an invalid
lc = utf_tolower(c); * sequence (ASCII character or more than one byte) and
if (c != lc) * utf_tolower() doesn't return the original character. */
if ((c < 0x80 || ol > 1) && c != lc)
{ {
int ol = utf_char2len(c);
int nl = utf_char2len(lc); int nl = utf_char2len(lc);
/* If the byte length changes need to shift the following /* If the byte length changes need to shift the following

View File

@ -676,6 +676,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
6,
/**/ /**/
5, 5,
/**/ /**/