diff options
Diffstat (limited to 'src/buffer.c')
-rw-r--r-- | src/buffer.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/buffer.c b/src/buffer.c index 020e7e5d8..5df085769 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1426,6 +1426,13 @@ enter_buffer(buf) 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 @@ get_winopts(buf) 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 } /* |