|
Karsten Hopp |
657a79 |
To: vim-dev@vim.org
|
|
Karsten Hopp |
657a79 |
Subject: patch 7.1.121
|
|
Karsten Hopp |
657a79 |
Fcc: outbox
|
|
Karsten Hopp |
657a79 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
657a79 |
Mime-Version: 1.0
|
|
Karsten Hopp |
657a79 |
Content-Type: text/plain; charset=ISO-8859-1
|
|
Karsten Hopp |
657a79 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
657a79 |
------------
|
|
Karsten Hopp |
657a79 |
|
|
Karsten Hopp |
657a79 |
Patch 7.1.121
|
|
Karsten Hopp |
657a79 |
Problem: Using ":cd %:h" when editing a file in the current directory
|
|
Karsten Hopp |
657a79 |
results in an error message for using an empty string.
|
|
Karsten Hopp |
657a79 |
Solution: When "%:h" results in an empty string use ".".
|
|
Karsten Hopp |
657a79 |
Files: src/eval.c
|
|
Karsten Hopp |
657a79 |
|
|
Karsten Hopp |
657a79 |
|
|
Karsten Hopp |
657a79 |
*** ../vim-7.1.120/src/eval.c Tue Sep 25 17:54:41 2007
|
|
Karsten Hopp |
657a79 |
--- src/eval.c Sun Sep 16 19:24:49 2007
|
|
Karsten Hopp |
657a79 |
***************
|
|
Karsten Hopp |
657a79 |
*** 21308,21321 ****
|
|
Karsten Hopp |
657a79 |
*usedlen += 2;
|
|
Karsten Hopp |
657a79 |
s = get_past_head(*fnamep);
|
|
Karsten Hopp |
657a79 |
while (tail > s && after_pathsep(s, tail))
|
|
Karsten Hopp |
657a79 |
! --tail;
|
|
Karsten Hopp |
657a79 |
*fnamelen = (int)(tail - *fnamep);
|
|
Karsten Hopp |
657a79 |
#ifdef VMS
|
|
Karsten Hopp |
657a79 |
if (*fnamelen > 0)
|
|
Karsten Hopp |
657a79 |
*fnamelen += 1; /* the path separator is part of the path */
|
|
Karsten Hopp |
657a79 |
#endif
|
|
Karsten Hopp |
657a79 |
! while (tail > s && !after_pathsep(s, tail))
|
|
Karsten Hopp |
657a79 |
! mb_ptr_back(*fnamep, tail);
|
|
Karsten Hopp |
657a79 |
}
|
|
Karsten Hopp |
657a79 |
|
|
Karsten Hopp |
657a79 |
/* ":8" - shortname */
|
|
Karsten Hopp |
657a79 |
--- 21308,21334 ----
|
|
Karsten Hopp |
657a79 |
*usedlen += 2;
|
|
Karsten Hopp |
657a79 |
s = get_past_head(*fnamep);
|
|
Karsten Hopp |
657a79 |
while (tail > s && after_pathsep(s, tail))
|
|
Karsten Hopp |
657a79 |
! mb_ptr_back(*fnamep, tail);
|
|
Karsten Hopp |
657a79 |
*fnamelen = (int)(tail - *fnamep);
|
|
Karsten Hopp |
657a79 |
#ifdef VMS
|
|
Karsten Hopp |
657a79 |
if (*fnamelen > 0)
|
|
Karsten Hopp |
657a79 |
*fnamelen += 1; /* the path separator is part of the path */
|
|
Karsten Hopp |
657a79 |
#endif
|
|
Karsten Hopp |
657a79 |
! if (*fnamelen == 0)
|
|
Karsten Hopp |
657a79 |
! {
|
|
Karsten Hopp |
657a79 |
! /* Result is empty. Turn it into "." to make ":cd %:h" work. */
|
|
Karsten Hopp |
657a79 |
! p = vim_strsave((char_u *)".");
|
|
Karsten Hopp |
657a79 |
! if (p == NULL)
|
|
Karsten Hopp |
657a79 |
! return -1;
|
|
Karsten Hopp |
657a79 |
! vim_free(*bufp);
|
|
Karsten Hopp |
657a79 |
! *bufp = *fnamep = tail = p;
|
|
Karsten Hopp |
657a79 |
! *fnamelen = 1;
|
|
Karsten Hopp |
657a79 |
! }
|
|
Karsten Hopp |
657a79 |
! else
|
|
Karsten Hopp |
657a79 |
! {
|
|
Karsten Hopp |
657a79 |
! while (tail > s && !after_pathsep(s, tail))
|
|
Karsten Hopp |
657a79 |
! mb_ptr_back(*fnamep, tail);
|
|
Karsten Hopp |
657a79 |
! }
|
|
Karsten Hopp |
657a79 |
}
|
|
Karsten Hopp |
657a79 |
|
|
Karsten Hopp |
657a79 |
/* ":8" - shortname */
|
|
Karsten Hopp |
657a79 |
*** ../vim-7.1.120/src/version.c Tue Sep 25 17:54:41 2007
|
|
Karsten Hopp |
657a79 |
--- src/version.c Tue Sep 25 20:38:08 2007
|
|
Karsten Hopp |
657a79 |
***************
|
|
Karsten Hopp |
657a79 |
*** 668,669 ****
|
|
Karsten Hopp |
657a79 |
--- 668,671 ----
|
|
Karsten Hopp |
657a79 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
657a79 |
+ /**/
|
|
Karsten Hopp |
657a79 |
+ 121,
|
|
Karsten Hopp |
657a79 |
/**/
|
|
Karsten Hopp |
657a79 |
|
|
Karsten Hopp |
657a79 |
--
|
|
Karsten Hopp |
657a79 |
It is illegal for anyone to try and stop a child from playfully jumping over
|
|
Karsten Hopp |
657a79 |
puddles of water.
|
|
Karsten Hopp |
657a79 |
[real standing law in California, United States of America]
|
|
Karsten Hopp |
657a79 |
|
|
Karsten Hopp |
657a79 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
657a79 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
657a79 |
\\\ download, build and distribute -- http://www.A-A-P.org ///
|
|
Karsten Hopp |
657a79 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|