Mercurial > vim
comparison src/spell.c @ 1808:e2d7622d7089 v7.2.106
updated for version 7.2-106
author | vimboss |
---|---|
date | Wed, 11 Feb 2009 16:58:49 +0000 |
parents | 1f90fab89ce3 |
children | f13849167330 |
comparison
equal
deleted
inserted
replaced
1807:a66c40578675 | 1808:e2d7622d7089 |
---|---|
2374 give_warning((char_u *)_(bot_top_msg), TRUE); | 2374 give_warning((char_u *)_(bot_top_msg), TRUE); |
2375 } | 2375 } |
2376 | 2376 |
2377 /* If we are back at the starting line and there is no match then | 2377 /* If we are back at the starting line and there is no match then |
2378 * give up. */ | 2378 * give up. */ |
2379 if (lnum == wp->w_cursor.lnum && !found_one) | 2379 if (lnum == wp->w_cursor.lnum && (!found_one || wrapped)) |
2380 break; | 2380 break; |
2381 | 2381 |
2382 /* Skip the characters at the start of the next line that were | 2382 /* Skip the characters at the start of the next line that were |
2383 * included in a match crossing line boundaries. */ | 2383 * included in a match crossing line boundaries. */ |
2384 if (attr == HLF_COUNT) | 2384 if (attr == HLF_COUNT) |
4954 | 4954 |
4955 /* | 4955 /* |
4956 * Structure that is used to store the items in the word tree. This avoids | 4956 * Structure that is used to store the items in the word tree. This avoids |
4957 * the need to keep track of each allocated thing, everything is freed all at | 4957 * the need to keep track of each allocated thing, everything is freed all at |
4958 * once after ":mkspell" is done. | 4958 * once after ":mkspell" is done. |
4959 * Note: "sb_next" must be just before "sb_data" to make sure the alignment of | |
4960 * "sb_data" is correct for systems where pointers must be aligned on | |
4961 * pointer-size boundaries and sizeof(pointer) > sizeof(int) (e.g., Sparc). | |
4959 */ | 4962 */ |
4960 #define SBLOCKSIZE 16000 /* size of sb_data */ | 4963 #define SBLOCKSIZE 16000 /* size of sb_data */ |
4961 typedef struct sblock_S sblock_T; | 4964 typedef struct sblock_S sblock_T; |
4962 struct sblock_S | 4965 struct sblock_S |
4963 { | 4966 { |
4967 int sb_used; /* nr of bytes already in use */ | |
4964 sblock_T *sb_next; /* next block in list */ | 4968 sblock_T *sb_next; /* next block in list */ |
4965 int sb_used; /* nr of bytes already in use */ | |
4966 char_u sb_data[1]; /* data, actually longer */ | 4969 char_u sb_data[1]; /* data, actually longer */ |
4967 }; | 4970 }; |
4968 | 4971 |
4969 /* | 4972 /* |
4970 * A node in the tree. | 4973 * A node in the tree. |
15009 /* Failed to compare. */ | 15012 /* Failed to compare. */ |
15010 break; | 15013 break; |
15011 | 15014 |
15012 case 0: | 15015 case 0: |
15013 /* | 15016 /* |
15014 * Lenghts are equal, thus changes must result in same length: An | 15017 * Lengths are equal, thus changes must result in same length: An |
15015 * insert is only possible in combination with a delete. | 15018 * insert is only possible in combination with a delete. |
15016 * 1: check if for identical strings | 15019 * 1: check if for identical strings |
15017 */ | 15020 */ |
15018 if (*pl == NUL) | 15021 if (*pl == NUL) |
15019 return score; | 15022 return score; |