comparison src/fileio.c @ 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 bb44542231dc
children a34232b17763
comparison
equal deleted inserted replaced
7169:afceb127f7d4 7170:beb67ef38f88
7545 #endif /* TEMPDIRNAMES */ 7545 #endif /* TEMPDIRNAMES */
7546 } 7546 }
7547 7547
7548 #if defined(BACKSLASH_IN_FILENAME) || defined(PROTO) 7548 #if defined(BACKSLASH_IN_FILENAME) || defined(PROTO)
7549 /* 7549 /*
7550 * Convert all backslashes in fname to forward slashes in-place. 7550 * Convert all backslashes in fname to forward slashes in-place, unless when
7551 * it looks like a URL.
7551 */ 7552 */
7552 void 7553 void
7553 forward_slash(fname) 7554 forward_slash(fname)
7554 char_u *fname; 7555 char_u *fname;
7555 { 7556 {
7556 char_u *p; 7557 char_u *p;
7557 7558
7559 if (path_with_url(fname))
7560 return;
7558 for (p = fname; *p != NUL; ++p) 7561 for (p = fname; *p != NUL; ++p)
7559 # ifdef FEAT_MBYTE 7562 # ifdef FEAT_MBYTE
7560 /* The Big5 encoding can have '\' in the trail byte. */ 7563 /* The Big5 encoding can have '\' in the trail byte. */
7561 if (enc_dbcs != 0 && (*mb_ptr2len)(p) > 1) 7564 if (enc_dbcs != 0 && (*mb_ptr2len)(p) > 1)
7562 ++p; 7565 ++p;