diff options
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) |