4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: Using ":cd %:h" when editing a file in the current directory
12 results in an error message for using an empty string.
13 Solution: When "%:h" results in an empty string use ".".
17 *** ../vim-7.1.120/src/eval.c Tue Sep 25 17:54:41 2007
18 --- src/eval.c Sun Sep 16 19:24:49 2007
22 s = get_past_head(*fnamep);
23 while (tail > s && after_pathsep(s, tail))
25 *fnamelen = (int)(tail - *fnamep);
28 *fnamelen += 1; /* the path separator is part of the path */
30 ! while (tail > s && !after_pathsep(s, tail))
31 ! mb_ptr_back(*fnamep, tail);
34 /* ":8" - shortname */
37 s = get_past_head(*fnamep);
38 while (tail > s && after_pathsep(s, tail))
39 ! mb_ptr_back(*fnamep, tail);
40 *fnamelen = (int)(tail - *fnamep);
43 *fnamelen += 1; /* the path separator is part of the path */
47 ! /* Result is empty. Turn it into "." to make ":cd %:h" work. */
48 ! p = vim_strsave((char_u *)".");
52 ! *bufp = *fnamep = tail = p;
57 ! while (tail > s && !after_pathsep(s, tail))
58 ! mb_ptr_back(*fnamep, tail);
62 /* ":8" - shortname */
63 *** ../vim-7.1.120/src/version.c Tue Sep 25 17:54:41 2007
64 --- src/version.c Tue Sep 25 20:38:08 2007
68 { /* Add new patch number below this line */
74 It is illegal for anyone to try and stop a child from playfully jumping over
76 [real standing law in California, United States of America]
78 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
79 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
80 \\\ download, build and distribute -- http://www.A-A-P.org ///
81 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///