summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <bram@vim.org>2014-11-19 19:33:16 +0100
committerBram Moolenaar <bram@vim.org>2014-11-19 19:33:16 +0100
commit4f37020f8292ab4a06ce8fdfd97e16e66967ce55 (patch)
tree4d10ec0f518f47234b1b34a9d6a8ce046f7e36bd
parent5471d9de15bf784728c84aeb753b538b372a9441 (diff)
downloadvim-7.4.524.tar.gz
updated for version 7.4.524v7.4.524v7-4-524
Problem: When using ":ownsyntax" spell checking is messed up. (Issue 78) Solution: Use the window-local option values. (Christian Brabandt)
-rw-r--r--src/option.c9
-rw-r--r--src/syntax.c3
-rw-r--r--src/version.c2
3 files changed, 8 insertions, 6 deletions
diff --git a/src/option.c b/src/option.c
index 6841d42d..a97dae62 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;
}
diff --git a/src/syntax.c b/src/syntax.c
index fcd20c8a..4f6ef924 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -6304,11 +6304,10 @@ ex_ownsyntax(eap)
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);
- 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
}
diff --git a/src/version.c b/src/version.c
index cc3bb243..890a49bf 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 524,
+/**/
523,
/**/
522,