vim-patch:7.4.896

Problem:    Editing a URL, which netrw should handle, doesn't work.
Solution:   Avoid changing slashes to backslashes. (Yasuhiro Matsumoto)

b4f6a46b01

Cherry-picked from https://github.com/neovim/neovim/pull/810, rebased.
This commit is contained in:
Rui Abreu Ferreira
2016-05-01 00:18:42 +01:00
committed by KillTheMule
parent b02ba11cb1
commit 24dac220d3
4 changed files with 31 additions and 4 deletions

View File

@@ -5097,13 +5097,15 @@ void write_lnum_adjust(linenr_T offset)
}
#if defined(BACKSLASH_IN_FILENAME)
/*
* 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(char_u *fname)
{
char_u *p;
if (path_with_url(fname)) {
return;
}
for (p = fname; *p != NUL; ++p)
/* The Big5 encoding can have '\' in the trail byte. */
if (enc_dbcs != 0 && (*mb_ptr2len)(p) > 1)