updated for version 7.4.088
Problem: When spell checking is enabled Asian characters are always marked
as error.
Solution: When 'spelllang' contains "cjk" do not mark Asian characters as
error. (Ken Takata)
diff --git a/src/option.c b/src/option.c
index 589e134..4e087a5 100644
--- a/src/option.c
+++ b/src/option.c
@@ -7122,6 +7122,11 @@
if (varp == &(curwin->w_s->b_p_spl))
{
char_u fname[200];
+ char_u *q = curwin->w_s->b_p_spl;
+
+ /* Skip the first name if it is "cjk". */
+ if (STRNCMP(q, "cjk,", 4) == 0)
+ q += 4;
/*
* Source the spell/LANG.vim in 'runtimepath'.
@@ -7129,11 +7134,10 @@
* Use the first name in 'spelllang' up to '_region' or
* '.encoding'.
*/
- for (p = curwin->w_s->b_p_spl; *p != NUL; ++p)
+ for (p = q; *p != NUL; ++p)
if (vim_strchr((char_u *)"_.,", *p) != NULL)
break;
- vim_snprintf((char *)fname, 200, "spell/%.*s.vim",
- (int)(p - curwin->w_s->b_p_spl), curwin->w_s->b_p_spl);
+ vim_snprintf((char *)fname, 200, "spell/%.*s.vim", (int)(p - q), q);
source_runtime(fname, TRUE);
}
#endif