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 / old / 5.5.066 < prev    next >
Encoding:
Internet Message Format  |  1999-12-08  |  3.0 KB

  1. To: vim-dev@vim.org
  2. Subject: patch 5.5.066
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. ------------
  6.  
  7. Patch 5.5.066
  8. Problem:    For systems with backslash in file name: Setting a file name
  9.         option to a value starting with "\\machine" removed a backslash.
  10. Solution:   Keep the double backslash for "\\machine", but do change
  11.         "\\\\machine" to "\\machine" for backwards compatibility.
  12. Files:        src/option.c, runtime/doc/options.txt
  13.  
  14.  
  15. *** ../vim-5.5.65/src/option.c    Sun Oct 17 16:44:57 1999
  16. --- src/option.c    Wed Dec  8 16:04:18 1999
  17. ***************
  18. *** 2435,2441 ****
  19.                   /*
  20.                    * Copy the string, skip over escaped chars.
  21.                    * For MS-DOS and WIN32 backslashes before normal
  22. !                  * file name characters are not removed.
  23.                    */
  24.                   while (*arg && !vim_iswhite(*arg))
  25.                   {
  26. --- 2435,2443 ----
  27.                   /*
  28.                    * Copy the string, skip over escaped chars.
  29.                    * For MS-DOS and WIN32 backslashes before normal
  30. !                  * file name characters are not removed, and keep
  31. !                  * backslash at start, for "\\machine\path", but
  32. !                  * do remove it for "\\\\machine\\path".
  33.                    */
  34.                   while (*arg && !vim_iswhite(*arg))
  35.                   {
  36. ***************
  37. *** 2443,2449 ****
  38.   #ifdef BACKSLASH_IN_FILENAME
  39.                       && !((flags & P_EXPAND)
  40.                           && vim_isfilec(arg[1])
  41. !                         && arg[1] != '\\')
  42.   #endif
  43.                                       )
  44.                       ++arg;
  45. --- 2445,2453 ----
  46.   #ifdef BACKSLASH_IN_FILENAME
  47.                       && !((flags & P_EXPAND)
  48.                           && vim_isfilec(arg[1])
  49. !                         && (arg[1] != '\\'
  50. !                             || (s == newval
  51. !                             && arg[2] != '\\')))
  52.   #endif
  53.                                       )
  54.                       ++arg;
  55. *** ../vim-5.5.65/runtime/doc/options.txt    Wed Dec  8 12:52:43 1999
  56. --- runtime/doc/options.txt    Wed Dec  8 16:19:26 1999
  57. ***************
  58. *** 137,142 ****
  59. --- 137,150 ----
  60.   variables are expanded) a backslash before a normal file name character is not
  61.   removed.  But a backslash before a special character (space, backslash, comma,
  62.   etc.) is used like explained above.
  63. + There is one special situation, when the value starts with "\\":
  64. + >  :set dir=\\machine\path        results in "\\machine\path"
  65. + >  :set dir=\\\\machine\\path        results in "\\machine\path"
  66. + >  :set dir=\\path\\file        results in "\\path\file" (wrong!)
  67. + For the first one the start is kept, but for the second one the backslashes
  68. + are halved.  This makes sure it works both when you expect backslashes to be
  69. + halved and when you expect the backslashes to be kept.  The third gives a
  70. + result which is probably not what you want.  Avoid it.
  71.   
  72.                   *add-option-flags* *remove-option-flags*
  73.   Some options are a list of flags.  When you want to add a flag to such an
  74. *** ../vim-5.5.65/src/version.c    Wed Dec  8 12:52:43 1999
  75. --- src/version.c    Wed Dec  8 16:19:37 1999
  76. ***************
  77. *** 420,420 ****
  78. --- 420,421 ----
  79.   {   /* Add new patch number below this line */
  80. +     66,
  81.  
  82. -- 
  83. Eight Megabytes And Continually Swapping.
  84.  
  85. --/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\--
  86.   \ \    www.vim.org/iccf      www.moolenaar.net       www.vim.org    / /
  87.