summaryrefslogtreecommitdiff
path: root/src/fileio.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-10-13 19:43:17 +0200
committerBram Moolenaar <Bram@vim.org>2015-10-13 19:43:17 +0200
commitb4f6a46b01ed00b642a2271e9d1559e51ab0f2c4 (patch)
tree48ba58ed615bcd676e499527d938d97ac7bce09e /src/fileio.c
parent23d1b62746dce048c80cc19e7e5af1d513b6b4cf (diff)
downloadvim-git-b4f6a46b01ed00b642a2271e9d1559e51ab0f2c4.tar.gz
patch 7.4.896v7.4.896
Problem: Editing a URL, which netrw should handle, doesn't work. Solution: Avoid changing slashes to backslashes. (Yasuhiro Matsumoto)
Diffstat (limited to 'src/fileio.c')
-rw-r--r--src/fileio.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 0f3f148b9..20c029498 100644
--- 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. */