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)
diff --git a/src/spellsuggest.c b/src/spellsuggest.c
index 3de9ff2..2951eea 100644
--- a/src/spellsuggest.c
+++ b/src/spellsuggest.c
@@ -791,7 +791,7 @@
if (su->su_badlen >= MAXWLEN)
su->su_badlen = MAXWLEN - 1; // just in case
vim_strncpy(su->su_badword, su->su_badptr, su->su_badlen);
- (void)spell_casefold(su->su_badptr, su->su_badlen,
+ (void)spell_casefold(curwin, su->su_badptr, su->su_badlen,
su->su_fbadword, MAXWLEN);
// TODO: make this work if the case-folded text is longer than the original
// text. Currently an illegal byte causes wrong pointer computations.
@@ -1176,7 +1176,7 @@
STRCPY(fword, su->su_fbadword);
n = (int)STRLEN(fword);
p = su->su_badptr + su->su_badlen;
- (void)spell_casefold(p, (int)STRLEN(p), fword + n, MAXWLEN - n);
+ (void)spell_casefold(curwin, p, (int)STRLEN(p), fword + n, MAXWLEN - n);
for (lpi = 0; lpi < curwin->w_s->b_langp.ga_len; ++lpi)
{
@@ -3005,7 +3005,8 @@
else
{
// soundfold the bad word with more characters following
- (void)spell_casefold(su->su_badptr, stp->st_orglen, fword, MAXWLEN);
+ (void)spell_casefold(curwin,
+ su->su_badptr, stp->st_orglen, fword, MAXWLEN);
// When joining two words the sound often changes a lot. E.g., "t he"
// sounds like "t h" while "the" sounds like "@". Avoid that by