]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
updated for version 7.0-101 v7.0.101
authorBram Moolenaar <Bram@vim.org>
Tue, 12 Sep 2006 20:25:24 +0000 (20:25 +0000)
committerBram Moolenaar <Bram@vim.org>
Tue, 12 Sep 2006 20:25:24 +0000 (20:25 +0000)
src/spell.c
src/version.c

index a79453ea34eb0d7ccd7cd3417a26af8c35a626b4..a6581af1dbaf12f4b81855a25b2bd8e23247afea 100644 (file)
@@ -9347,20 +9347,27 @@ spell_add_word(word, len, bad, idx, undo)
            fclose(fd);
        }
     }
-    else
+
+    if (!undo)
     {
        fd = mch_fopen((char *)fname, "a");
        if (fd == NULL && new_spf)
        {
+           char_u *p;
+
            /* We just initialized the 'spellfile' option and can't open the
             * file.  We may need to create the "spell" directory first.  We
             * already checked the runtime directory is writable in
             * init_spellfile(). */
-           if (!dir_of_file_exists(fname))
+           if (!dir_of_file_exists(fname) && (p = gettail_sep(fname)) != fname)
            {
+               int c = *p;
+
                /* The directory doesn't exist.  Try creating it and opening
                 * the file again. */
-               vim_mkdir(NameBuff, 0755);
+               *p = NUL;
+               vim_mkdir(fname, 0755);
+               *p = c;
                fd = mch_fopen((char *)fname, "a");
            }
        }
index c170e15307dd08577cf81f0916c88ae5ebca0a21..2565b7ab98a77b497dd35e96404fd770369c7a32 100644 (file)
@@ -666,6 +666,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    101,
 /**/
     100,
 /**/