diff options
author | Bram Moolenaar <Bram@vim.org> | 2014-11-19 19:33:16 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2014-11-19 19:33:16 +0100 |
commit | 2683c8e7f7d8eb6222653d55849a9c556de27f45 (patch) | |
tree | 1e1104e9a4bfd19fa02bf3246eba7e657dd3231f /src/option.c | |
parent | 2f3b510b0f9203d31e2f7f536ebfbcb17766e09e (diff) | |
download | vim-git-2683c8e7f7d8eb6222653d55849a9c556de27f45.tar.gz |
updated for version 7.4.524v7.4.524
Problem: When using ":ownsyntax" spell checking is messed up. (Issue 78)
Solution: Use the window-local option values. (Christian Brabandt)
Diffstat (limited to 'src/option.c')
-rw-r--r-- | src/option.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/option.c b/src/option.c index 6841d42d6..a97dae626 100644 --- a/src/option.c +++ b/src/option.c @@ -6706,15 +6706,16 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf, #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)) + if (varp == &(curwin->w_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, + 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; } |