home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 6.0.036 < prev    next >
Encoding:
Internet Message Format  |  2001-10-28  |  2.5 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.0.036
  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 6.0.036
  11. Problem:    OS/2, MS-DOS and MS-Windows: Using a path that starts with a
  12.         slash in 'tags' doesn't work as expected. (Mathias Koehrer
  13. Solution:   Only use the drive, not the whole path to the current directory.
  14.         Also make it work for "c:dir/file".
  15. Files:        src/misc2.c
  16.  
  17.  
  18. *** ../vim60.35/src/misc2.c    Sun Oct 28 21:57:01 2001
  19. --- src/misc2.c    Mon Oct 29 17:14:44 2001
  20. ***************
  21. *** 3532,3542 ****
  22.       }
  23.       else if (*path == NUL || !vim_isAbsName(path))
  24.       {
  25. !     if (mch_dirname(ff_expand_buffer, MAXPATHL) == OK)
  26. !         ff_search_ctx->ffsc_start_dir = vim_strsave(ff_expand_buffer);
  27.   
  28.       if (ff_search_ctx->ffsc_start_dir == NULL)
  29.           goto error_return;
  30.       }
  31.   
  32.   #ifdef FEAT_PATH_EXTRA
  33. --- 3533,3568 ----
  34.       }
  35.       else if (*path == NUL || !vim_isAbsName(path))
  36.       {
  37. ! #ifdef BACKSLASH_IN_FILENAME
  38. !     /* "c:dir" needs "c:" to be expanded, otherwise use current dir */
  39. !     if (path[1] == ':')
  40. !     {
  41. !         char_u  drive[3];
  42. !         drive[0] = path[0];
  43. !         drive[1] = ':';
  44. !         drive[2] = NUL;
  45. !         if (vim_FullName(drive, ff_expand_buffer, MAXPATHL, TRUE) == FAIL)
  46. !         goto error_return;
  47. !         path += 2;
  48. !     }
  49. !     else
  50. ! #endif
  51. !     if (mch_dirname(ff_expand_buffer, MAXPATHL) == FAIL)
  52. !         goto error_return;
  53.   
  54. +     ff_search_ctx->ffsc_start_dir = vim_strsave(ff_expand_buffer);
  55.       if (ff_search_ctx->ffsc_start_dir == NULL)
  56.           goto error_return;
  57. + #ifdef BACKSLASH_IN_FILENAME
  58. +     /* A path that starts with "/dir" is relative to the drive, not to the
  59. +      * directory (but not for "//machine/dir").  Only use the drive name. */
  60. +     if ((*path == '/' || *path == '\\')
  61. +         && path[1] != path[0]
  62. +         && ff_search_ctx->ffsc_start_dir[1] == ':')
  63. +         ff_search_ctx->ffsc_start_dir[2] = NUL;
  64. + #endif
  65.       }
  66.   
  67.   #ifdef FEAT_PATH_EXTRA
  68. *** ../vim60.35/src/version.c    Mon Oct 29 15:24:28 2001
  69. --- src/version.c    Mon Oct 29 16:38:23 2001
  70. ***************
  71. *** 608,609 ****
  72. --- 608,611 ----
  73.   {   /* Add new patch number below this line */
  74. + /**/
  75. +     36,
  76.   /**/
  77.  
  78. -- 
  79. Did you ever stop to think...  and forget to start again? 
  80.                                   -- Steven Wright
  81.  
  82.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  83. (((   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   )))
  84.  \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///
  85.