comparison src/spellfile.c @ 24872:59cfa23bd9eb v8.2.2974

patch 8.2.2974: Greek spell checking uses wrong case folding Commit: https://github.com/vim/vim/commit/4f135275984722c1b1e9ace72eeeb7ce7e4ec983 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jun 11 19:07:40 2021 +0200 patch 8.2.2974: Greek spell checking uses wrong case folding Problem: Greek spell checking uses wrong case folding. Solution: Fold capital sigma depending on whether it is at the end of a word or not. (closes #299)
author Bram Moolenaar <Bram@vim.org>
date Fri, 11 Jun 2021 19:15:04 +0200
parents ba4f8569ff8a
children 8f2262c72178
comparison
equal deleted inserted replaced
24871:7551b2508d35 24872:59cfa23bd9eb
3427 char_u word[MAXWLEN]; 3427 char_u word[MAXWLEN];
3428 3428
3429 if (ga_grow(gap, 1) == OK) 3429 if (ga_grow(gap, 1) == OK)
3430 { 3430 {
3431 ftp = ((fromto_T *)gap->ga_data) + gap->ga_len; 3431 ftp = ((fromto_T *)gap->ga_data) + gap->ga_len;
3432 (void)spell_casefold(from, (int)STRLEN(from), word, MAXWLEN); 3432 (void)spell_casefold(curwin, from, (int)STRLEN(from), word, MAXWLEN);
3433 ftp->ft_from = getroom_save(spin, word); 3433 ftp->ft_from = getroom_save(spin, word);
3434 (void)spell_casefold(to, (int)STRLEN(to), word, MAXWLEN); 3434 (void)spell_casefold(curwin, to, (int)STRLEN(to), word, MAXWLEN);
3435 ftp->ft_to = getroom_save(spin, word); 3435 ftp->ft_to = getroom_save(spin, word);
3436 ++gap->ga_len; 3436 ++gap->ga_len;
3437 } 3437 }
3438 } 3438 }
3439 3439
4389 int ct = captype(word, word + len); 4389 int ct = captype(word, word + len);
4390 char_u foldword[MAXWLEN]; 4390 char_u foldword[MAXWLEN];
4391 int res = OK; 4391 int res = OK;
4392 char_u *p; 4392 char_u *p;
4393 4393
4394 (void)spell_casefold(word, len, foldword, MAXWLEN); 4394 (void)spell_casefold(curwin, word, len, foldword, MAXWLEN);
4395 for (p = pfxlist; res == OK; ++p) 4395 for (p = pfxlist; res == OK; ++p)
4396 { 4396 {
4397 if (!need_affix || (p != NULL && *p != NUL)) 4397 if (!need_affix || (p != NULL && *p != NUL))
4398 res = tree_add_word(spin, foldword, spin->si_foldroot, ct | flags, 4398 res = tree_add_word(spin, foldword, spin->si_foldroot, ct | flags,
4399 region, p == NULL ? 0 : *p); 4399 region, p == NULL ? 0 : *p);