]>
Commit | Line | Data |
---|---|---|
9512a71a AG |
1 | To: vim-dev@vim.org |
2 | Subject: Patch 7.2.106 | |
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.2.106 | |
11 | Problem: Endless loop when using "]s" in HTML when there are no | |
12 | misspellings. (Ingo Karkat) | |
13 | Solution: Break the search loop. Also fix pointer alignment for systems | |
14 | with pointers larger than int. | |
15 | Files: src/spell.c | |
16 | ||
17 | ||
18 | *** ../vim-7.2.105/src/spell.c Tue Dec 9 22:34:02 2008 | |
19 | --- src/spell.c Wed Feb 11 17:54:50 2009 | |
20 | *************** | |
21 | *** 2376,2382 **** | |
22 | ||
23 | /* If we are back at the starting line and there is no match then | |
24 | * give up. */ | |
25 | ! if (lnum == wp->w_cursor.lnum && !found_one) | |
26 | break; | |
27 | ||
28 | /* Skip the characters at the start of the next line that were | |
29 | --- 2376,2382 ---- | |
30 | ||
31 | /* If we are back at the starting line and there is no match then | |
32 | * give up. */ | |
33 | ! if (lnum == wp->w_cursor.lnum && (!found_one || wrapped)) | |
34 | break; | |
35 | ||
36 | /* Skip the characters at the start of the next line that were | |
37 | *************** | |
38 | *** 4956,4968 **** | |
39 | * Structure that is used to store the items in the word tree. This avoids | |
40 | * the need to keep track of each allocated thing, everything is freed all at | |
41 | * once after ":mkspell" is done. | |
42 | */ | |
43 | #define SBLOCKSIZE 16000 /* size of sb_data */ | |
44 | typedef struct sblock_S sblock_T; | |
45 | struct sblock_S | |
46 | { | |
47 | - sblock_T *sb_next; /* next block in list */ | |
48 | int sb_used; /* nr of bytes already in use */ | |
49 | char_u sb_data[1]; /* data, actually longer */ | |
50 | }; | |
51 | ||
52 | --- 4956,4971 ---- | |
53 | * Structure that is used to store the items in the word tree. This avoids | |
54 | * the need to keep track of each allocated thing, everything is freed all at | |
55 | * once after ":mkspell" is done. | |
56 | + * Note: "sb_next" must be just before "sb_data" to make sure the alignment of | |
57 | + * "sb_data" is correct for systems where pointers must be aligned on | |
58 | + * pointer-size boundaries and sizeof(pointer) > sizeof(int) (e.g., Sparc). | |
59 | */ | |
60 | #define SBLOCKSIZE 16000 /* size of sb_data */ | |
61 | typedef struct sblock_S sblock_T; | |
62 | struct sblock_S | |
63 | { | |
64 | int sb_used; /* nr of bytes already in use */ | |
65 | + sblock_T *sb_next; /* next block in list */ | |
66 | char_u sb_data[1]; /* data, actually longer */ | |
67 | }; | |
68 | ||
69 | *************** | |
70 | *** 15011,15017 **** | |
71 | ||
72 | case 0: | |
73 | /* | |
74 | ! * Lenghts are equal, thus changes must result in same length: An | |
75 | * insert is only possible in combination with a delete. | |
76 | * 1: check if for identical strings | |
77 | */ | |
78 | --- 15014,15020 ---- | |
79 | ||
80 | case 0: | |
81 | /* | |
82 | ! * Lengths are equal, thus changes must result in same length: An | |
83 | * insert is only possible in combination with a delete. | |
84 | * 1: check if for identical strings | |
85 | */ | |
86 | *** ../vim-7.2.105/src/version.c Wed Feb 11 16:45:56 2009 | |
87 | --- src/version.c Wed Feb 11 17:56:34 2009 | |
88 | *************** | |
89 | *** 678,679 **** | |
90 | --- 678,681 ---- | |
91 | { /* Add new patch number below this line */ | |
92 | + /**/ | |
93 | + 106, | |
94 | /**/ | |
95 | ||
96 | -- | |
97 | If bankers can count, how come they have eight windows and | |
98 | only four tellers? | |
99 | ||
100 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
101 | /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
102 | \\\ download, build and distribute -- http://www.A-A-P.org /// | |
103 | \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |