4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: Spell checking considers super- and subscript characters as word
13 Solution: Recognize the Unicode super and subscript characters.
17 *** ../vim-7.1.292/src/spell.c Tue Apr 1 17:13:54 2008
18 --- src/spell.c Wed Apr 9 15:47:06 2008
22 static int spell_iswordp __ARGS((char_u *p, buf_T *buf));
23 static int spell_iswordp_nmw __ARGS((char_u *p));
25 + static int spell_mb_isword_class __ARGS((int cl));
26 static int spell_iswordp_w __ARGS((int *p, buf_T *buf));
28 static int write_spell_prefcond __ARGS((FILE *fd, garray_T *gap));
34 ! return mb_get_class(s) >= 2;
35 return spelltab.st_isw[c];
42 ! return spell_mb_isword_class(mb_get_class(s));
43 return spelltab.st_isw[c];
51 ! return mb_get_class(p) >= 2;
52 return spelltab.st_isw[c];
59 ! return spell_mb_isword_class(mb_get_class(p));
60 return spelltab.st_isw[c];
69 + * Return TRUE if word class indicates a word character.
70 + * Only for characters above 255.
71 + * Unicode subscript and superscript are not considered word characters.
74 + spell_mb_isword_class(cl)
77 + return cl >= 2 && cl != 0x2070 && cl != 0x2080;
81 * Return TRUE if "p" points to a word character.
82 * Wide version of spell_iswordp().
89 ! return utf_class(*s) >= 2;
91 return dbcs_class((unsigned)*s >> 8, *s & 0xff) >= 2;
97 ! return spell_mb_isword_class(utf_class(*s));
99 return dbcs_class((unsigned)*s >> 8, *s & 0xff) >= 2;
101 *** ../vim-7.1.292/src/version.c Wed Apr 9 12:14:44 2008
102 --- src/version.c Wed Apr 9 15:45:10 2008
106 { /* Add new patch number below this line */
112 hundred-and-one symptoms of being an internet addict:
113 268. You get up in the morning and go online before getting your coffee.
115 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
116 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
117 \\\ download, build and distribute -- http://www.A-A-P.org ///
118 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///