Skip to content

Commit b4f6a46

Browse files
committed
patch 7.4.896
Problem: Editing a URL, which netrw should handle, doesn't work. Solution: Avoid changing slashes to backslashes. (Yasuhiro Matsumoto)
1 parent 23d1b62 commit b4f6a46

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

src/fileio.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7547,14 +7547,17 @@ vim_tempname(extra_char, keep)
75477547

75487548
#if defined(BACKSLASH_IN_FILENAME) || defined(PROTO)
75497549
/*
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.
75517552
*/
75527553
void
75537554
forward_slash(fname)
75547555
char_u *fname;
75557556
{
75567557
char_u *p;
75577558

7559+
if (path_with_url(fname))
7560+
return;
75587561
for (p = fname; *p != NUL; ++p)
75597562
# ifdef FEAT_MBYTE
75607563
/* The Big5 encoding can have '\' in the trail byte. */

src/os_mswin.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,11 +481,14 @@ mch_isFullName(char_u *fname)
481481
* commands that use a file name should try to avoid the need to type a
482482
* backslash twice.
483483
* When 'shellslash' set do it the other way around.
484+
* When the path looks like a URL leave it unmodified.
484485
*/
485486
void
486487
slash_adjust(p)
487488
char_u *p;
488489
{
490+
if (path_with_url(p))
491+
return;
489492
while (*p)
490493
{
491494
if (*p == psepcN)

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,8 @@ static char *(features[]) =
741741

742742
static int included_patches[] =
743743
{ /* Add new patch number below this line */
744+
/**/
745+
896,
744746
/**/
745747
895,
746748
/**/

0 commit comments

Comments
 (0)