updated for version 7.1a-001
diff --git a/src/buffer.c b/src/buffer.c
index 020e7e5..5df0857 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1426,6 +1426,13 @@
if (curbuf->b_kmap_state & KEYMAP_INIT)
keymap_init();
#endif
+#ifdef FEAT_SPELL
+ /* May need to set the spell language. Can only do this after the buffer
+ * has been properly setup. */
+ if (!curbuf->b_help && curwin->w_p_spell && *curbuf->b_p_spl != NUL)
+ did_set_spelllang(curbuf);
+#endif
+
redraw_later(NOT_VALID);
}
@@ -2415,11 +2422,6 @@
if (p_fdls >= 0)
curwin->w_p_fdl = p_fdls;
#endif
-
-#ifdef FEAT_SPELL
- if (curwin->w_p_spell && *buf->b_p_spl != NUL)
- did_set_spelllang(buf);
-#endif
}
/*