changeset 7170:beb67ef38f88 v7.4.896

commit https://github.com/vim/vim/commit/b4f6a46b01ed00b642a2271e9d1559e51ab0f2c4 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Oct 13 19:43:17 2015 +0200 patch 7.4.896 Problem: Editing a URL, which netrw should handle, doesn't work. Solution: Avoid changing slashes to backslashes. (Yasuhiro Matsumoto)
author Christian Brabandt <cb@256bit.org>
date Tue, 13 Oct 2015 19:45:05 +0200
parents afceb127f7d4
children cb6e9d77af1b
files src/fileio.c src/os_mswin.c src/version.c
diffstat 3 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -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. */
--- a/src/os_mswin.c
+++ b/src/os_mswin.c
@@ -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)
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    896,
+/**/
     895,
 /**/
     894,