Blame SOURCES/7.4.042

d6ba96
To: vim_dev@googlegroups.com
d6ba96
Subject: Patch 7.4.042
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.042
d6ba96
Problem:    When using ":setlocal" for 'spell' and 'spellang' then :spelldump
d6ba96
	    doesn't work. (Dimitar Dimitrov)
d6ba96
Solution:   Copy the option variables to the new window used to show the dump.
d6ba96
	    (Christian Brabandt)
d6ba96
Files:	    src/spell.c
d6ba96
d6ba96
d6ba96
*** ../vim-7.4.041/src/spell.c	2013-09-25 18:54:20.000000000 +0200
d6ba96
--- src/spell.c	2013-09-29 13:15:51.000000000 +0200
d6ba96
***************
d6ba96
*** 15569,15579 ****
d6ba96
  ex_spelldump(eap)
d6ba96
      exarg_T *eap;
d6ba96
  {
d6ba96
      if (no_spell_checking(curwin))
d6ba96
  	return;
d6ba96
  
d6ba96
!     /* Create a new empty buffer by splitting the window. */
d6ba96
      do_cmdline_cmd((char_u *)"new");
d6ba96
      if (!bufempty() || !buf_valid(curbuf))
d6ba96
  	return;
d6ba96
  
d6ba96
--- 15569,15589 ----
d6ba96
  ex_spelldump(eap)
d6ba96
      exarg_T *eap;
d6ba96
  {
d6ba96
+     char_u  *spl;
d6ba96
+     long    dummy;
d6ba96
+ 
d6ba96
      if (no_spell_checking(curwin))
d6ba96
  	return;
d6ba96
+     get_option_value((char_u*)"spl", &dummy, &spl, OPT_LOCAL);
d6ba96
  
d6ba96
!     /* Create a new empty buffer in a new window. */
d6ba96
      do_cmdline_cmd((char_u *)"new");
d6ba96
+ 
d6ba96
+     /* enable spelling locally in the new window */
d6ba96
+     set_option_value((char_u*)"spell", TRUE, (char_u*)"", OPT_LOCAL);
d6ba96
+     set_option_value((char_u*)"spl",  dummy,         spl, OPT_LOCAL);
d6ba96
+     vim_free(spl);
d6ba96
+ 
d6ba96
      if (!bufempty() || !buf_valid(curbuf))
d6ba96
  	return;
d6ba96
  
d6ba96
*** ../vim-7.4.041/src/version.c	2013-09-25 23:24:54.000000000 +0200
d6ba96
--- src/version.c	2013-09-29 13:15:17.000000000 +0200
d6ba96
***************
d6ba96
*** 740,741 ****
d6ba96
--- 740,743 ----
d6ba96
  {   /* Add new patch number below this line */
d6ba96
+ /**/
d6ba96
+     42,
d6ba96
  /**/
d6ba96
d6ba96
-- 
d6ba96
Experience is what you get when you don't get what you want.
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    ///