mirror of
https://github.com/neovim/neovim.git
synced 2025-09-22 11:18:19 +00:00
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:

committed by
KillTheMule

parent
b02ba11cb1
commit
24dac220d3
@@ -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)
|
||||
|
Reference in New Issue
Block a user