diff options
author | Rui Abreu Ferreira <raf-ep@gmx.com> | 2016-05-01 00:18:42 +0100 |
---|---|---|
committer | KillTheMule <KillTheMule@users.noreply.github.com> | 2016-05-08 20:24:02 +0200 |
commit | 24dac220d377d0dedbe192437b1da4b5b6f4bd6f (patch) | |
tree | 076a6a78342d774c0e42698dc60c7e66f014d806 /src/nvim/fileio.c | |
parent | b02ba11cb156e094d3f6f12fc7c79a983b6df68d (diff) | |
download | rneovim-24dac220d377d0dedbe192437b1da4b5b6f4bd6f.tar.gz rneovim-24dac220d377d0dedbe192437b1da4b5b6f4bd6f.tar.bz2 rneovim-24dac220d377d0dedbe192437b1da4b5b6f4bd6f.zip |
vim-patch:7.4.896
Problem: Editing a URL, which netrw should handle, doesn't work.
Solution: Avoid changing slashes to backslashes. (Yasuhiro Matsumoto)
https://github.com/vim/vim/commit/b4f6a46b01ed00b642a2271e9d1559e51ab0f2c4
Cherry-picked from https://github.com/neovim/neovim/pull/810, rebased.
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r-- | src/nvim/fileio.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index 6c0bc59d93..6030f388d5 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -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) |