aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/spell.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/spell.c')
-rw-r--r--src/nvim/spell.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/spell.c b/src/nvim/spell.c
index c75a53a777..a221f3fd75 100644
--- a/src/nvim/spell.c
+++ b/src/nvim/spell.c
@@ -2008,6 +2008,10 @@ char_u *did_set_spelllang(win_T *wp)
region = NULL;
len = (int)STRLEN(lang);
+ if (!valid_spellang(lang)) {
+ continue;
+ }
+
if (STRCMP(lang, "cjk") == 0) {
wp->w_s->b_cjk = 1;
continue;