summaryrefslogtreecommitdiff
path: root/src/charset.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-04-24 22:04:21 +0000
committerBram Moolenaar <Bram@vim.org>2005-04-24 22:04:21 +0000
commitc91506a0333241681f7564d0d46bb85b793d94b4 (patch)
treedbbfa44758a5dc2d018bf19fa629607d15e44532 /src/charset.c
parent2a489f5fdd1be0b2abfb5d300e38bad425d4b456 (diff)
downloadvim-git-c91506a0333241681f7564d0d46bb85b793d94b4.tar.gz
updated for version 7.0071
Diffstat (limited to 'src/charset.c')
-rw-r--r--src/charset.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/charset.c b/src/charset.c
index 00a5326c8..c19828447 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -991,14 +991,15 @@ init_spell_chartab()
else
#endif
{
- /* Rough guess: use isalpha() for characters above 128. */
+ /* Rough guess: use isalpha() and isupper() for characters above 128.
+ * */
for (i = 128; i < 256; ++i)
{
- spelltab.st_isw[i] = isalpha(i);
- if (isupper(i))
+ spelltab.st_isw[i] = MB_ISUPPER(i) || MB_ISLOWER(i);
+ if (MB_ISUPPER(i))
{
spelltab.st_isu[i] = TRUE;
- spelltab.st_fold[i] = tolower(i);
+ spelltab.st_fold[i] = MB_TOLOWER(i);
}
}
}
@@ -1150,6 +1151,8 @@ set_spell_finish(new_st)
#if defined(FEAT_MBYTE) || defined(PROTO)
/*
* Write the current tables into the .spl file.
+ * This makes sure the same characters are recognized as word characters when
+ * generating an when using a spell file.
*/
void
write_spell_chartab(fd)
@@ -1160,15 +1163,6 @@ write_spell_chartab(fd)
int flags;
int i;
- if (!did_set_spelltab)
- {
- /* No character table specified, write zero counts. */
- fputc(0, fd);
- fputc(0, fd);
- fputc(0, fd);
- return;
- }
-
fputc(128, fd); /* <charflagslen> */
for (i = 128; i < 256; ++i)
{