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