diff options
Diffstat (limited to 'src/spell.c')
-rw-r--r-- | src/spell.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/spell.c b/src/spell.c index ae4db12c0..947bee518 100644 --- a/src/spell.c +++ b/src/spell.c @@ -2308,11 +2308,14 @@ did_set_spelllang(win_T *wp) /* Loop over comma separated language names. */ for (splp = spl_copy; *splp != NUL; ) { - /* Get one language name. */ + // Get one language name. copy_option_part(&splp, lang, MAXWLEN, ","); region = NULL; len = (int)STRLEN(lang); + if (!valid_spellang(lang)) + continue; + if (STRCMP(lang, "cjk") == 0) { wp->w_s->b_cjk = 1; |