073263
To: vim_dev@googlegroups.com
073263
Subject: Patch 7.4.524
073263
Fcc: outbox
073263
From: Bram Moolenaar <Bram@moolenaar.net>
073263
Mime-Version: 1.0
073263
Content-Type: text/plain; charset=UTF-8
073263
Content-Transfer-Encoding: 8bit
073263
------------
073263
073263
Patch 7.4.524
073263
Problem:    When using ":ownsyntax" spell checking is messed up. (Issue 78)
073263
Solution:   Use the window-local option values. (Christian Brabandt)
073263
Files:	    src/option.c, src/syntax.c
073263
073263
073263
*** ../vim-7.4.523/src/option.c	2014-11-05 17:44:47.676471691 +0100
073263
--- src/option.c	2014-11-19 19:29:49.351843116 +0100
073263
***************
073263
*** 6706,6720 ****
073263
  #ifdef FEAT_SPELL
073263
      /* When 'spelllang' or 'spellfile' is set and there is a window for this
073263
       * buffer in which 'spell' is set load the wordlists. */
073263
!     else if (varp == &(curbuf->b_s.b_p_spl) || varp == &(curbuf->b_s.b_p_spf))
073263
      {
073263
  	win_T	    *wp;
073263
  	int	    l;
073263
  
073263
! 	if (varp == &(curbuf->b_s.b_p_spf))
073263
  	{
073263
! 	    l = (int)STRLEN(curbuf->b_s.b_p_spf);
073263
! 	    if (l > 0 && (l < 4 || STRCMP(curbuf->b_s.b_p_spf + l - 4,
073263
  								".add") != 0))
073263
  		errmsg = e_invarg;
073263
  	}
073263
--- 6706,6721 ----
073263
  #ifdef FEAT_SPELL
073263
      /* When 'spelllang' or 'spellfile' is set and there is a window for this
073263
       * buffer in which 'spell' is set load the wordlists. */
073263
!     else if (varp == &(curwin->w_s->b_p_spl)
073263
! 	    || varp == &(curwin->w_s->b_p_spf))
073263
      {
073263
  	win_T	    *wp;
073263
  	int	    l;
073263
  
073263
! 	if (varp == &(curwin->w_s->b_p_spf))
073263
  	{
073263
! 	    l = (int)STRLEN(curwin->w_s->b_p_spf);
073263
! 	    if (l > 0 && (l < 4 || STRCMP(curwin->w_s->b_p_spf + l - 4,
073263
  								".add") != 0))
073263
  		errmsg = e_invarg;
073263
  	}
073263
*** ../vim-7.4.523/src/syntax.c	2014-11-19 16:38:01.512679964 +0100
073263
--- src/syntax.c	2014-11-19 19:24:56.431160659 +0100
073263
***************
073263
*** 6304,6314 ****
073263
  	curwin->w_s = (synblock_T *)alloc(sizeof(synblock_T));
073263
  	memset(curwin->w_s, 0, sizeof(synblock_T));
073263
  #ifdef FEAT_SPELL
073263
  	curwin->w_p_spell = FALSE;	/* No spell checking */
073263
  	clear_string_option(&curwin->w_s->b_p_spc);
073263
  	clear_string_option(&curwin->w_s->b_p_spf);
073263
- 	vim_regfree(curwin->w_s->b_cap_prog);
073263
- 	curwin->w_s->b_cap_prog = NULL;
073263
  	clear_string_option(&curwin->w_s->b_p_spl);
073263
  #endif
073263
      }
073263
--- 6304,6313 ----
073263
  	curwin->w_s = (synblock_T *)alloc(sizeof(synblock_T));
073263
  	memset(curwin->w_s, 0, sizeof(synblock_T));
073263
  #ifdef FEAT_SPELL
073263
+ 	/* TODO: keep the spell checking as it was. */
073263
  	curwin->w_p_spell = FALSE;	/* No spell checking */
073263
  	clear_string_option(&curwin->w_s->b_p_spc);
073263
  	clear_string_option(&curwin->w_s->b_p_spf);
073263
  	clear_string_option(&curwin->w_s->b_p_spl);
073263
  #endif
073263
      }
073263
*** ../vim-7.4.523/src/version.c	2014-11-19 18:48:41.515814987 +0100
073263
--- src/version.c	2014-11-19 19:26:00.158438943 +0100
073263
***************
073263
*** 743,744 ****
073263
--- 743,746 ----
073263
  {   /* Add new patch number below this line */
073263
+ /**/
073263
+     524,
073263
  /**/
073263
073263
-- 
073263
A special law prohibits unmarried women from parachuting on Sunday or she
073263
shall risk arrest, fine, and/or jailing.
073263
		[real standing law in Florida, United States of America]
073263
073263
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
073263
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
073263
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
073263
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///