dcaee6
To: vim_dev@googlegroups.com
dcaee6
Subject: Patch 7.4.042
dcaee6
Fcc: outbox
dcaee6
From: Bram Moolenaar <Bram@moolenaar.net>
dcaee6
Mime-Version: 1.0
dcaee6
Content-Type: text/plain; charset=UTF-8
dcaee6
Content-Transfer-Encoding: 8bit
dcaee6
------------
dcaee6
dcaee6
Patch 7.4.042
dcaee6
Problem:    When using ":setlocal" for 'spell' and 'spellang' then :spelldump
dcaee6
	    doesn't work. (Dimitar Dimitrov)
dcaee6
Solution:   Copy the option variables to the new window used to show the dump.
dcaee6
	    (Christian Brabandt)
dcaee6
Files:	    src/spell.c
dcaee6
dcaee6
dcaee6
*** ../vim-7.4.041/src/spell.c	2013-09-25 18:54:20.000000000 +0200
dcaee6
--- src/spell.c	2013-09-29 13:15:51.000000000 +0200
dcaee6
***************
dcaee6
*** 15569,15579 ****
dcaee6
  ex_spelldump(eap)
dcaee6
      exarg_T *eap;
dcaee6
  {
dcaee6
      if (no_spell_checking(curwin))
dcaee6
  	return;
dcaee6
  
dcaee6
!     /* Create a new empty buffer by splitting the window. */
dcaee6
      do_cmdline_cmd((char_u *)"new");
dcaee6
      if (!bufempty() || !buf_valid(curbuf))
dcaee6
  	return;
dcaee6
  
dcaee6
--- 15569,15589 ----
dcaee6
  ex_spelldump(eap)
dcaee6
      exarg_T *eap;
dcaee6
  {
dcaee6
+     char_u  *spl;
dcaee6
+     long    dummy;
dcaee6
+ 
dcaee6
      if (no_spell_checking(curwin))
dcaee6
  	return;
dcaee6
+     get_option_value((char_u*)"spl", &dummy, &spl, OPT_LOCAL);
dcaee6
  
dcaee6
!     /* Create a new empty buffer in a new window. */
dcaee6
      do_cmdline_cmd((char_u *)"new");
dcaee6
+ 
dcaee6
+     /* enable spelling locally in the new window */
dcaee6
+     set_option_value((char_u*)"spell", TRUE, (char_u*)"", OPT_LOCAL);
dcaee6
+     set_option_value((char_u*)"spl",  dummy,         spl, OPT_LOCAL);
dcaee6
+     vim_free(spl);
dcaee6
+ 
dcaee6
      if (!bufempty() || !buf_valid(curbuf))
dcaee6
  	return;
dcaee6
  
dcaee6
*** ../vim-7.4.041/src/version.c	2013-09-25 23:24:54.000000000 +0200
dcaee6
--- src/version.c	2013-09-29 13:15:17.000000000 +0200
dcaee6
***************
dcaee6
*** 740,741 ****
dcaee6
--- 740,743 ----
dcaee6
  {   /* Add new patch number below this line */
dcaee6
+ /**/
dcaee6
+     42,
dcaee6
  /**/
dcaee6
dcaee6
-- 
dcaee6
Experience is what you get when you don't get what you want.
dcaee6
dcaee6
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
dcaee6
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
dcaee6
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
dcaee6
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///