Karsten Hopp 75346e
To: vim-dev@vim.org
Karsten Hopp 75346e
Subject: patch 7.1.077
Karsten Hopp 75346e
Fcc: outbox
Karsten Hopp 75346e
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 75346e
Mime-Version: 1.0
Karsten Hopp 75346e
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp 75346e
Content-Transfer-Encoding: 8bit
Karsten Hopp 75346e
------------
Karsten Hopp 75346e
Karsten Hopp 75346e
Patch 7.1.077
Karsten Hopp 75346e
Problem:    Using "can_spell" without initializing it. (Dominique Pelle)
Karsten Hopp 75346e
Solution:   Set a default for get_syntax_attr().
Karsten Hopp 75346e
Files:	    src/syntax.c
Karsten Hopp 75346e
Karsten Hopp 75346e
Karsten Hopp 75346e
*** ../vim-7.1.076/src/syntax.c	Thu Jul 26 22:55:11 2007
Karsten Hopp 75346e
--- src/syntax.c	Sun Aug 12 19:49:07 2007
Karsten Hopp 75346e
***************
Karsten Hopp 75346e
*** 1727,1732 ****
Karsten Hopp 75346e
--- 1727,1739 ----
Karsten Hopp 75346e
  {
Karsten Hopp 75346e
      int	    attr = 0;
Karsten Hopp 75346e
  
Karsten Hopp 75346e
+     if (can_spell != NULL)
Karsten Hopp 75346e
+ 	/* Default: Only do spelling when there is no @Spell cluster or when
Karsten Hopp 75346e
+ 	 * ":syn spell toplevel" was used. */
Karsten Hopp 75346e
+ 	*can_spell = syn_buf->b_syn_spell == SYNSPL_DEFAULT
Karsten Hopp 75346e
+ 		    ? (syn_buf->b_spell_cluster_id == 0)
Karsten Hopp 75346e
+ 		    : (syn_buf->b_syn_spell == SYNSPL_TOP);
Karsten Hopp 75346e
+ 
Karsten Hopp 75346e
      /* check for out of memory situation */
Karsten Hopp 75346e
      if (syn_buf->b_sst_array == NULL)
Karsten Hopp 75346e
  	return 0;
Karsten Hopp 75346e
*** ../vim-7.1.076/src/version.c	Tue Aug 14 22:54:00 2007
Karsten Hopp 75346e
--- src/version.c	Tue Aug 14 23:06:26 2007
Karsten Hopp 75346e
***************
Karsten Hopp 75346e
*** 668,669 ****
Karsten Hopp 75346e
--- 668,671 ----
Karsten Hopp 75346e
  {   /* Add new patch number below this line */
Karsten Hopp 75346e
+ /**/
Karsten Hopp 75346e
+     77,
Karsten Hopp 75346e
  /**/
Karsten Hopp 75346e
Karsten Hopp 75346e
-- 
Karsten Hopp 75346e
Send $25.00 for handy leaflet on how to make money by selling leaflets
Karsten Hopp 75346e
Karsten Hopp 75346e
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 75346e
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 75346e
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp 75346e
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///