astepano / rpms / vim

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