Blame SOURCES/7.4.524

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