Skip to content

Commit

Permalink
Do not resolve reparse point when :e or :file
Browse files Browse the repository at this point in the history
  • Loading branch information
mattn committed Feb 5, 2019
1 parent 8843bb3 commit e17c269
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -4847,7 +4847,7 @@ fname_expand(
char_u *rfname;

// If the file name is a shortcut file, use the file it links to.
rfname = mch_resolve_path(*ffname);
rfname = mch_resolve_path(*ffname, FALSE);
if (rfname != NULL)
{
vim_free(*ffname);
Expand Down
2 changes: 1 addition & 1 deletion src/evalfunc.c
Original file line number Diff line number Diff line change
Expand Up @@ -9894,7 +9894,7 @@ f_resolve(typval_T *argvars, typval_T *rettv)
{
char_u *v = NULL;

v = mch_resolve_path(p);
v = mch_resolve_path(p, TRUE);
if (v != NULL)
rettv->vval.v_string = v;
else
Expand Down
4 changes: 2 additions & 2 deletions src/os_mswin.c
Original file line number Diff line number Diff line change
Expand Up @@ -2107,10 +2107,10 @@ resolve_shortcut(char_u *fname)
}

char_u *
mch_resolve_path(char_u *fname)
mch_resolve_path(char_u *fname, int reparse_point)
{
char_u *path = resolve_shortcut(fname);
if (path == NULL)
if (path == NULL && reparse_point)
path = resolve_reparse_point(fname);
return path;
}
Expand Down
2 changes: 1 addition & 1 deletion src/proto/os_mswin.pro
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ int mch_print_text_out(char_u *p, int len);
void mch_print_set_font(int iBold, int iItalic, int iUnderline);
void mch_print_set_bg(long_u bgcol);
void mch_print_set_fg(long_u fgcol);
char_u *mch_resolve_path(char_u *fname);
char_u *mch_resolve_path(char_u *fname, int reparse_point);
void win32_set_foreground(void);
void serverInitMessaging(void);
void serverSetName(char_u *name);
Expand Down

0 comments on commit e17c269

Please sign in to comment.