]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.108 v7.4.108
authorBram Moolenaar <Bram@vim.org>
Thu, 28 Nov 2013 16:41:46 +0000 (17:41 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 28 Nov 2013 16:41:46 +0000 (17:41 +0100)
Problem:    "zG" and "zW" leave temp files around on MS-Windows.
Solution:   Delete the temp files when exiting. (Ken Takata)

src/memline.c
src/proto/spell.pro
src/spell.c
src/version.c

index 2f08557f825b5f7e09155c221d450232f72c1594..ea6571cb2d591428235f0ce91fdf1279841e451e 100644 (file)
@@ -841,8 +841,11 @@ ml_close_all(del_file)
     for (buf = firstbuf; buf != NULL; buf = buf->b_next)
        ml_close(buf, del_file && ((buf->b_flags & BF_PRESERVED) == 0
                                 || vim_strchr(p_cpo, CPO_PRESERVE) == NULL));
+#ifdef FEAT_SPELL
+    spell_delete_wordlist();   /* delete the internal wordlist */
+#endif
 #ifdef TEMPDIRNAMES
-    vim_deltempdir();      /* delete created temp directory */
+    vim_deltempdir();          /* delete created temp directory */
 #endif
 }
 
index 9ed775b53ebb252fc15f98bf355842621ef8887d..5c399b37096d8b9dd431e0124fadfc0eb29a6bbc 100644 (file)
@@ -3,6 +3,7 @@ int spell_check __ARGS((win_T *wp, char_u *ptr, hlf_T *attrp, int *capcol, int d
 int spell_move_to __ARGS((win_T *wp, int dir, int allwords, int curline, hlf_T *attrp));
 void spell_cat_line __ARGS((char_u *buf, char_u *line, int maxlen));
 char_u *did_set_spelllang __ARGS((win_T *wp));
+void spell_delete_wordlist __ARGS((void));
 void spell_free_all __ARGS((void));
 void spell_reload __ARGS((void));
 int spell_check_msm __ARGS((void));
index 18a39570d80d84387c146b6d2cc69b5c5252f6d0..66ccecb07a4cfb14ed9f1a4f3c430a42e0908ce1 100644 (file)
@@ -2180,9 +2180,9 @@ spell_move_to(wp, dir, allwords, curline, attrp)
     char_u     *endp;
     hlf_T      attr;
     int                len;
-# ifdef FEAT_SYN_HL
+#ifdef FEAT_SYN_HL
     int                has_syntax = syntax_present(wp);
-# endif
+#endif
     int                col;
     int                can_spell;
     char_u     *buf = NULL;
@@ -2280,7 +2280,7 @@ spell_move_to(wp, dir, allwords, curline, attrp)
                                                     : p - buf)
                                                  > wp->w_cursor.col)))
                    {
-# ifdef FEAT_SYN_HL
+#ifdef FEAT_SYN_HL
                        if (has_syntax)
                        {
                            col = (int)(p - buf);
@@ -4701,7 +4701,25 @@ badword_captype(word, end)
     return flags;
 }
 
-# if defined(FEAT_MBYTE) || defined(EXITFREE) || defined(PROTO)
+/*
+ * Delete the internal wordlist and its .spl file.
+ */
+    void
+spell_delete_wordlist()
+{
+    char_u     fname[MAXPATHL];
+
+    if (int_wordlist != NULL)
+    {
+       mch_remove(int_wordlist);
+       int_wordlist_spl(fname);
+       mch_remove(fname);
+       vim_free(int_wordlist);
+       int_wordlist = NULL;
+    }
+}
+
+#if defined(FEAT_MBYTE) || defined(EXITFREE) || defined(PROTO)
 /*
  * Free all languages.
  */
@@ -4710,7 +4728,6 @@ spell_free_all()
 {
     slang_T    *slang;
     buf_T      *buf;
-    char_u     fname[MAXPATHL];
 
     /* Go through all buffers and handle 'spelllang'. <VN> */
     for (buf = firstbuf; buf != NULL; buf = buf->b_next)
@@ -4723,24 +4740,16 @@ spell_free_all()
        slang_free(slang);
     }
 
-    if (int_wordlist != NULL)
-    {
-       /* Delete the internal wordlist and its .spl file */
-       mch_remove(int_wordlist);
-       int_wordlist_spl(fname);
-       mch_remove(fname);
-       vim_free(int_wordlist);
-       int_wordlist = NULL;
-    }
+    spell_delete_wordlist();
 
     vim_free(repl_to);
     repl_to = NULL;
     vim_free(repl_from);
     repl_from = NULL;
 }
-# endif
+#endif
 
-# if defined(FEAT_MBYTE) || defined(PROTO)
+#if defined(FEAT_MBYTE) || defined(PROTO)
 /*
  * Clear all spelling tables and reload them.
  * Used after 'encoding' is set and when ":mkspell" was used.
@@ -4773,7 +4782,7 @@ spell_reload()
        }
     }
 }
-# endif
+#endif
 
 /*
  * Reload the spell file "fname" if it's loaded.
index 1354f9c0ea4f0cf1fc2e4742d9f317e14ec77b7e..b982283aa096956235e4fe6b0c16466e1f19f191 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    108,
 /**/
     107,
 /**/