]> git.pld-linux.org Git - packages/vim.git/blob - 7.0.101
- new
[packages/vim.git] / 7.0.101
1 To: vim-dev@vim.org
2 Subject: Patch 7.0.101
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.0.101
11 Problem:    When the "~/.vim/spell" directory does not exist "zg" may create
12             a wrong directory.  "zw" doesn't work.
13 Solution:   Use the directory of the file name instead of NameBuff.  For "zw"
14             not only remove a good word but also add the word with "!".
15 Files:      src/spell.c
16
17
18 *** ../vim-7.0.100/src/spell.c  Mon Sep 11 21:37:27 2006
19 --- src/spell.c Tue Sep 12 20:21:01 2006
20 ***************
21 *** 9347,9366 ****
22             fclose(fd);
23         }
24       }
25 !     else
26       {
27         fd = mch_fopen((char *)fname, "a");
28         if (fd == NULL && new_spf)
29         {
30             /* We just initialized the 'spellfile' option and can't open the
31              * file.  We may need to create the "spell" directory first.  We
32              * already checked the runtime directory is writable in
33              * init_spellfile(). */
34 !           if (!dir_of_file_exists(fname))
35             {
36                 /* The directory doesn't exist.  Try creating it and opening
37                  * the file again. */
38 !               vim_mkdir(NameBuff, 0755);
39                 fd = mch_fopen((char *)fname, "a");
40             }
41         }
42 --- 9347,9373 ----
43             fclose(fd);
44         }
45       }
46
47 !     if (!undo)
48       {
49         fd = mch_fopen((char *)fname, "a");
50         if (fd == NULL && new_spf)
51         {
52 +           char_u *p;
53
54             /* We just initialized the 'spellfile' option and can't open the
55              * file.  We may need to create the "spell" directory first.  We
56              * already checked the runtime directory is writable in
57              * init_spellfile(). */
58 !           if (!dir_of_file_exists(fname) && (p = gettail_sep(fname)) != fname)
59             {
60 +               int c = *p;
61
62                 /* The directory doesn't exist.  Try creating it and opening
63                  * the file again. */
64 !               *p = NUL;
65 !               vim_mkdir(fname, 0755);
66 !               *p = c;
67                 fd = mch_fopen((char *)fname, "a");
68             }
69         }
70 *** ../vim-7.0.100/src/version.c        Mon Sep 11 21:37:27 2006
71 --- src/version.c       Tue Sep 12 21:47:21 2006
72 ***************
73 *** 668,669 ****
74 --- 668,671 ----
75   {   /* Add new patch number below this line */
76 + /**/
77 +     101,
78   /**/
79
80 -- 
81 ARTHUR: Did you say shrubberies?
82 ROGER:  Yes.  Shrubberies are my trade.  I am a shrubber.  My name is Roger
83         the Shrubber.  I arrange, design, and sell shrubberies.
84                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
85
86  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
87 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
88 \\\        download, build and distribute -- http://www.A-A-P.org        ///
89  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.046054 seconds and 3 git commands to generate.