Mirror of the Vim source from https://github.com/vim/vim
修訂 | 79a23c19108a8b1eb9d1b97d5844fabee6525e23 (tree) |
---|---|
時間 | 2007-08-16 03:41:34 |
作者 | vimboss |
Commiter | vimboss |
updated for version 7.1-079
@@ -207,7 +207,10 @@ | ||
207 | 207 | } |
208 | 208 | while (c <= c2) |
209 | 209 | { |
210 | - if (!do_isalpha || isalpha(c) | |
210 | + /* Use the MB_ functions here, because isalpha() doesn't | |
211 | + * work properly when 'encoding' is "latin1" and the locale is | |
212 | + * "C". */ | |
213 | + if (!do_isalpha || MB_ISLOWER(c) || MB_ISUPPER(c) | |
211 | 214 | #ifdef FEAT_FKMAP |
212 | 215 | || (p_altkeymap && (F_isalpha(c) || F_isdigit(c))) |
213 | 216 | #endif |
@@ -54,10 +54,12 @@ | ||
54 | 54 | |
55 | 55 | /* |
56 | 56 | * toupper() and tolower() that use the current locale. |
57 | - * On some systems toupper()/tolower() only work on lower/uppercase characters | |
57 | + * On some systems toupper()/tolower() only work on lower/uppercase | |
58 | + * characters, first use islower() or isupper() then. | |
58 | 59 | * Careful: Only call TOUPPER_LOC() and TOLOWER_LOC() with a character in the |
59 | 60 | * range 0 - 255. toupper()/tolower() on some systems can't handle others. |
60 | - * Note: for UTF-8 use utf_toupper() and utf_tolower(). | |
61 | + * Note: It is often better to use MB_TOLOWER() and MB_TOUPPER(), because many | |
62 | + * toupper() and tolower() implementations only work for ASCII. | |
61 | 63 | */ |
62 | 64 | #ifdef MSWIN |
63 | 65 | # define TOUPPER_LOC(c) toupper_tab[(c) & 255] |
@@ -667,6 +667,8 @@ | ||
667 | 667 | static int included_patches[] = |
668 | 668 | { /* Add new patch number below this line */ |
669 | 669 | /**/ |
670 | + 79, | |
671 | +/**/ | |
670 | 672 | 78, |
671 | 673 | /**/ |
672 | 674 | 77, |