summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvimboss <devnull@localhost>2007-08-15 18:41:34 +0000
committervimboss <devnull@localhost>2007-08-15 18:41:34 +0000
commitd13a4088ea13eccf72bb37bab625d3b19fcf3bce (patch)
treee1d3584f63a340e9a0a57a16d595ee03518adbaf
parent5f508f5d99388be6dfddef349ed63b337fba79a0 (diff)
downloadvim-d13a4088ea13eccf72bb37bab625d3b19fcf3bce.tar.gz
updated for version 7.1-079v7.1.079v7-1-079
-rw-r--r--src/charset.c5
-rw-r--r--src/macros.h6
-rw-r--r--src/version.c2
3 files changed, 10 insertions, 3 deletions
diff --git a/src/charset.c b/src/charset.c
index 8f058bde..5a2952cd 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -207,7 +207,10 @@ buf_init_chartab(buf, global)
}
while (c <= c2)
{
- if (!do_isalpha || isalpha(c)
+ /* Use the MB_ functions here, because isalpha() doesn't
+ * work properly when 'encoding' is "latin1" and the locale is
+ * "C". */
+ if (!do_isalpha || MB_ISLOWER(c) || MB_ISUPPER(c)
#ifdef FEAT_FKMAP
|| (p_altkeymap && (F_isalpha(c) || F_isdigit(c)))
#endif
diff --git a/src/macros.h b/src/macros.h
index 400f7712..f2230995 100644
--- a/src/macros.h
+++ b/src/macros.h
@@ -54,10 +54,12 @@
/*
* toupper() and tolower() that use the current locale.
- * On some systems toupper()/tolower() only work on lower/uppercase characters
+ * On some systems toupper()/tolower() only work on lower/uppercase
+ * characters, first use islower() or isupper() then.
* Careful: Only call TOUPPER_LOC() and TOLOWER_LOC() with a character in the
* range 0 - 255. toupper()/tolower() on some systems can't handle others.
- * Note: for UTF-8 use utf_toupper() and utf_tolower().
+ * Note: It is often better to use MB_TOLOWER() and MB_TOUPPER(), because many
+ * toupper() and tolower() implementations only work for ASCII.
*/
#ifdef MSWIN
# define TOUPPER_LOC(c) toupper_tab[(c) & 255]
diff --git a/src/version.c b/src/version.c
index 5f8faf87..11d94435 100644
--- a/src/version.c
+++ b/src/version.c
@@ -667,6 +667,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 79,
+/**/
78,
/**/
77,