0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

updated for version 7.1-293

This commit is contained in:
Bram Moolenaar
2008-04-09 13:49:57 +00:00
parent 34cbfdf8f8
commit 7a91a4a12e
2 changed files with 18 additions and 3 deletions

View File

@@ -753,6 +753,7 @@ static int set_spell_finish __ARGS((spelltab_T *new_st));
static int spell_iswordp __ARGS((char_u *p, buf_T *buf)); static int spell_iswordp __ARGS((char_u *p, buf_T *buf));
static int spell_iswordp_nmw __ARGS((char_u *p)); static int spell_iswordp_nmw __ARGS((char_u *p));
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
static int spell_mb_isword_class __ARGS((int cl));
static int spell_iswordp_w __ARGS((int *p, buf_T *buf)); static int spell_iswordp_w __ARGS((int *p, buf_T *buf));
#endif #endif
static int write_spell_prefcond __ARGS((FILE *fd, garray_T *gap)); static int write_spell_prefcond __ARGS((FILE *fd, garray_T *gap));
@@ -9789,7 +9790,7 @@ spell_iswordp(p, buf)
c = mb_ptr2char(s); c = mb_ptr2char(s);
if (c > 255) if (c > 255)
return mb_get_class(s) >= 2; return spell_mb_isword_class(mb_get_class(s));
return spelltab.st_isw[c]; return spelltab.st_isw[c];
} }
#endif #endif
@@ -9812,7 +9813,7 @@ spell_iswordp_nmw(p)
{ {
c = mb_ptr2char(p); c = mb_ptr2char(p);
if (c > 255) if (c > 255)
return mb_get_class(p) >= 2; return spell_mb_isword_class(mb_get_class(p));
return spelltab.st_isw[c]; return spelltab.st_isw[c];
} }
#endif #endif
@@ -9820,6 +9821,18 @@ spell_iswordp_nmw(p)
} }
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
/*
* Return TRUE if word class indicates a word character.
* Only for characters above 255.
* Unicode subscript and superscript are not considered word characters.
*/
static int
spell_mb_isword_class(cl)
int cl;
{
return cl >= 2 && cl != 0x2070 && cl != 0x2080;
}
/* /*
* Return TRUE if "p" points to a word character. * Return TRUE if "p" points to a word character.
* Wide version of spell_iswordp(). * Wide version of spell_iswordp().
@@ -9841,7 +9854,7 @@ spell_iswordp_w(p, buf)
if (*s > 255) if (*s > 255)
{ {
if (enc_utf8) if (enc_utf8)
return utf_class(*s) >= 2; return spell_mb_isword_class(utf_class(*s));
if (enc_dbcs) if (enc_dbcs)
return dbcs_class((unsigned)*s >> 8, *s & 0xff) >= 2; return dbcs_class((unsigned)*s >> 8, *s & 0xff) >= 2;
return 0; return 0;

View File

@@ -666,6 +666,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 */
/**/
293,
/**/ /**/
292, 292,
/**/ /**/