]> granicus.if.org Git - vim/commitdiff
patch 7.4.896 v7.4.896
authorBram Moolenaar <Bram@vim.org>
Tue, 13 Oct 2015 17:43:17 +0000 (19:43 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 13 Oct 2015 17:43:17 +0000 (19:43 +0200)
Problem:    Editing a URL, which netrw should handle, doesn't work.
Solution:   Avoid changing slashes to backslashes. (Yasuhiro Matsumoto)

src/fileio.c
src/os_mswin.c
src/version.c

index 0f3f148b9bc657d762a056d2d4f811477a8722ad..20c0294988a59b5964e8c860378117ba840fb120 100644 (file)
@@ -7547,7 +7547,8 @@ vim_tempname(extra_char, keep)
 
 #if defined(BACKSLASH_IN_FILENAME) || defined(PROTO)
 /*
- * Convert all backslashes in fname to forward slashes in-place.
+ * Convert all backslashes in fname to forward slashes in-place, unless when
+ * it looks like a URL.
  */
     void
 forward_slash(fname)
@@ -7555,6 +7556,8 @@ forward_slash(fname)
 {
     char_u     *p;
 
+    if (path_with_url(fname))
+       return;
     for (p = fname; *p != NUL; ++p)
 # ifdef  FEAT_MBYTE
        /* The Big5 encoding can have '\' in the trail byte. */
index b50b86c888b8531940f3c5b9a43a41038589f57c..daf71a304d5ee01cb9fec5f138e94f66b19e12e9 100644 (file)
@@ -481,11 +481,14 @@ mch_isFullName(char_u *fname)
  * commands that use a file name should try to avoid the need to type a
  * backslash twice.
  * When 'shellslash' set do it the other way around.
+ * When the path looks like a URL leave it unmodified.
  */
     void
 slash_adjust(p)
     char_u  *p;
 {
+    if (path_with_url(p))
+       return;
     while (*p)
     {
        if (*p == psepcN)
index 746b62959b9c670824169d983a5839ed884eadb4..83bfe2b08e1521a2a9e7e8c691bbba062045b6ee 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    896,
 /**/
     895,
 /**/