]> git.pld-linux.org Git - packages/vim.git/blob - 7.1.293
- typo
[packages/vim.git] / 7.1.293
1 To: vim-dev@vim.org
2 Subject: Patch 7.1.293
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.1.293
11 Problem:    Spell checking considers super- and subscript characters as word
12             characters.
13 Solution:   Recognize the Unicode super and subscript characters.
14 Files:      src/spell.c
15
16
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
19 ***************
20 *** 753,758 ****
21 --- 753,759 ----
22   static int spell_iswordp __ARGS((char_u *p, buf_T *buf));
23   static int spell_iswordp_nmw __ARGS((char_u *p));
24   #ifdef FEAT_MBYTE
25 + static int spell_mb_isword_class __ARGS((int cl));
26   static int spell_iswordp_w __ARGS((int *p, buf_T *buf));
27   #endif
28   static int write_spell_prefcond __ARGS((FILE *fd, garray_T *gap));
29 ***************
30 *** 9789,9795 ****
31   
32         c = mb_ptr2char(s);
33         if (c > 255)
34 !           return mb_get_class(s) >= 2;
35         return spelltab.st_isw[c];
36       }
37   #endif
38 --- 9790,9796 ----
39   
40         c = mb_ptr2char(s);
41         if (c > 255)
42 !           return spell_mb_isword_class(mb_get_class(s));
43         return spelltab.st_isw[c];
44       }
45   #endif
46 ***************
47 *** 9812,9818 ****
48       {
49         c = mb_ptr2char(p);
50         if (c > 255)
51 !           return mb_get_class(p) >= 2;
52         return spelltab.st_isw[c];
53       }
54   #endif
55 --- 9813,9819 ----
56       {
57         c = mb_ptr2char(p);
58         if (c > 255)
59 !           return spell_mb_isword_class(mb_get_class(p));
60         return spelltab.st_isw[c];
61       }
62   #endif
63 ***************
64 *** 9821,9826 ****
65 --- 9822,9839 ----
66   
67   #ifdef FEAT_MBYTE
68   /*
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.
72 +  */
73 +     static int
74 + spell_mb_isword_class(cl)
75 +     int cl;
76 + {
77 +     return cl >= 2 && cl != 0x2070 && cl != 0x2080;
78 + }
79
80 + /*
81    * Return TRUE if "p" points to a word character.
82    * Wide version of spell_iswordp().
83    */
84 ***************
85 *** 9841,9847 ****
86       if (*s > 255)
87       {
88         if (enc_utf8)
89 !           return utf_class(*s) >= 2;
90         if (enc_dbcs)
91             return dbcs_class((unsigned)*s >> 8, *s & 0xff) >= 2;
92         return 0;
93 --- 9854,9860 ----
94       if (*s > 255)
95       {
96         if (enc_utf8)
97 !           return spell_mb_isword_class(utf_class(*s));
98         if (enc_dbcs)
99             return dbcs_class((unsigned)*s >> 8, *s & 0xff) >= 2;
100         return 0;
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
103 ***************
104 *** 668,669 ****
105 --- 673,676 ----
106   {   /* Add new patch number below this line */
107 + /**/
108 +     293,
109   /**/
110
111 -- 
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.
114
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    ///
This page took 0.632454 seconds and 3 git commands to generate.