Mercurial > vim
diff src/option.c @ 6386:762ab69c2d13 v7.4.524
updated for version 7.4.524
Problem: When using ":ownsyntax" spell checking is messed up. (Issue 78)
Solution: Use the window-local option values. (Christian Brabandt)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 19 Nov 2014 19:33:16 +0100 |
parents | 7b28dc1d756e |
children | 3421b24e419c |
line wrap: on
line diff
--- a/src/option.c +++ b/src/option.c @@ -6706,15 +6706,16 @@ did_set_string_option(opt_idx, varp, new #ifdef FEAT_SPELL /* When 'spelllang' or 'spellfile' is set and there is a window for this * buffer in which 'spell' is set load the wordlists. */ - else if (varp == &(curbuf->b_s.b_p_spl) || varp == &(curbuf->b_s.b_p_spf)) + else if (varp == &(curwin->w_s->b_p_spl) + || varp == &(curwin->w_s->b_p_spf)) { win_T *wp; int l; - if (varp == &(curbuf->b_s.b_p_spf)) - { - l = (int)STRLEN(curbuf->b_s.b_p_spf); - if (l > 0 && (l < 4 || STRCMP(curbuf->b_s.b_p_spf + l - 4, + if (varp == &(curwin->w_s->b_p_spf)) + { + l = (int)STRLEN(curwin->w_s->b_p_spf); + if (l > 0 && (l < 4 || STRCMP(curwin->w_s->b_p_spf + l - 4, ".add") != 0)) errmsg = e_invarg; }