| To: vim_dev@googlegroups.com |
| Subject: Patch 7.4.524 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 7.4.524 |
| Problem: When using ":ownsyntax" spell checking is messed up. (Issue 78) |
| Solution: Use the window-local option values. (Christian Brabandt) |
| Files: src/option.c, src/syntax.c |
| |
| |
| |
| |
| |
| *** 6706,6720 **** |
| #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)) |
| { |
| 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, |
| ".add") != 0)) |
| errmsg = e_invarg; |
| } |
| --- 6706,6721 ---- |
| #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 == &(curwin->w_s->b_p_spl) |
| ! || varp == &(curwin->w_s->b_p_spf)) |
| { |
| win_T *wp; |
| int l; |
| |
| ! 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; |
| } |
| |
| |
| |
| *** 6304,6314 **** |
| curwin->w_s = (synblock_T *)alloc(sizeof(synblock_T)); |
| memset(curwin->w_s, 0, sizeof(synblock_T)); |
| #ifdef FEAT_SPELL |
| curwin->w_p_spell = FALSE; /* No spell checking */ |
| clear_string_option(&curwin->w_s->b_p_spc); |
| clear_string_option(&curwin->w_s->b_p_spf); |
| - vim_regfree(curwin->w_s->b_cap_prog); |
| - curwin->w_s->b_cap_prog = NULL; |
| clear_string_option(&curwin->w_s->b_p_spl); |
| #endif |
| } |
| --- 6304,6313 ---- |
| curwin->w_s = (synblock_T *)alloc(sizeof(synblock_T)); |
| memset(curwin->w_s, 0, sizeof(synblock_T)); |
| #ifdef FEAT_SPELL |
| + /* TODO: keep the spell checking as it was. */ |
| curwin->w_p_spell = FALSE; /* No spell checking */ |
| clear_string_option(&curwin->w_s->b_p_spc); |
| clear_string_option(&curwin->w_s->b_p_spf); |
| clear_string_option(&curwin->w_s->b_p_spl); |
| #endif |
| } |
| |
| |
| |
| *** 743,744 **** |
| --- 743,746 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 524, |
| /**/ |
| |
| -- |
| A special law prohibits unmarried women from parachuting on Sunday or she |
| shall risk arrest, fine, and/or jailing. |
| [real standing law in Florida, United States of America] |
| |
| /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ |
| /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
| \\\ an exciting new programming language -- http://www.Zimbu.org /// |
| \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |