]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.042 v7.4.042
authorBram Moolenaar <Bram@vim.org>
Sun, 29 Sep 2013 11:38:29 +0000 (13:38 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 29 Sep 2013 11:38:29 +0000 (13:38 +0200)
Problem:    When using ":setlocal" for 'spell' and 'spellang' then :spelldump
            doesn't work. (Dimitar Dimitrov)
Solution:   Copy the option variables to the new window used to show the dump.
            (Christian Brabandt)

src/spell.c
src/version.c

index 3ee8b02ac6555c3e4fb9bf035270279e5440c983..2972fe9154594e5858e9ab6fdafb534fc3dfcaab 100644 (file)
@@ -15569,11 +15569,21 @@ ex_spellinfo(eap)
 ex_spelldump(eap)
     exarg_T *eap;
 {
+    char_u  *spl;
+    long    dummy;
+
     if (no_spell_checking(curwin))
        return;
+    get_option_value((char_u*)"spl", &dummy, &spl, OPT_LOCAL);
 
-    /* Create a new empty buffer by splitting the window. */
+    /* Create a new empty buffer in a new window. */
     do_cmdline_cmd((char_u *)"new");
+
+    /* enable spelling locally in the new window */
+    set_option_value((char_u*)"spell", TRUE, (char_u*)"", OPT_LOCAL);
+    set_option_value((char_u*)"spl",  dummy,         spl, OPT_LOCAL);
+    vim_free(spl);
+
     if (!bufempty() || !buf_valid(curbuf))
        return;
 
index 9da06c8d4fbddb8dbfe5e203437a1329d416190a..74a3e727666227f74018e31b68f6fb4db3ab581d 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    42,
 /**/
     41,
 /**/