forked from aniani/vim
updated for version 7.2c-002
This commit is contained in:
@@ -2832,11 +2832,13 @@ fnameescape({string}) *fnameescape()*
|
|||||||
For most systems the characters escaped are
|
For most systems the characters escaped are
|
||||||
" \t\n*?[{`$\\%#'\"|!<". For systems where a backslash
|
" \t\n*?[{`$\\%#'\"|!<". For systems where a backslash
|
||||||
appears in a filename, it depends on the value of 'isfname'.
|
appears in a filename, it depends on the value of 'isfname'.
|
||||||
|
A leading '+' and '>' is also escaped (special after |:edit|
|
||||||
|
and |:write|). And a "-" by itself (special after |:cd|).
|
||||||
Example: >
|
Example: >
|
||||||
:let fname = 'some str%nge|name'
|
:let fname = '+some str%nge|name'
|
||||||
:exe "edit " . fnameescape(fname)
|
:exe "edit " . fnameescape(fname)
|
||||||
< results in executing: >
|
< results in executing: >
|
||||||
edit some\ str\%nge\|name
|
edit \+some\ str\%nge\|name
|
||||||
|
|
||||||
fnamemodify({fname}, {mods}) *fnamemodify()*
|
fnamemodify({fname}, {mods}) *fnamemodify()*
|
||||||
Modify file name {fname} according to {mods}. {mods} is a
|
Modify file name {fname} according to {mods}. {mods} is a
|
||||||
|
@@ -3717,7 +3717,7 @@ vim_strsave_fnameescape(fname, shell)
|
|||||||
if ((*p != '[' && *p != '{') || !vim_isfilec(*p))
|
if ((*p != '[' && *p != '{') || !vim_isfilec(*p))
|
||||||
buf[j++] = *p;
|
buf[j++] = *p;
|
||||||
buf[j] = NUL;
|
buf[j] = NUL;
|
||||||
return vim_strsave_escaped(fname, buf);
|
p = vim_strsave_escaped(fname, buf);
|
||||||
#else
|
#else
|
||||||
p = vim_strsave_escaped(fname, shell ? SHELL_ESC_CHARS : PATH_ESC_CHARS);
|
p = vim_strsave_escaped(fname, shell ? SHELL_ESC_CHARS : PATH_ESC_CHARS);
|
||||||
if (shell && csh_like_shell() && p != NULL)
|
if (shell && csh_like_shell() && p != NULL)
|
||||||
@@ -3730,8 +3730,14 @@ vim_strsave_fnameescape(fname, shell)
|
|||||||
vim_free(p);
|
vim_free(p);
|
||||||
p = s;
|
p = s;
|
||||||
}
|
}
|
||||||
return p;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* '>' and '+' are special at the start of some commands, e.g. ":edit" and
|
||||||
|
* ":write". "cd -" has a special meaning. */
|
||||||
|
if (*p == '>' || *p == '+' || (*p == '-' && p[1] == NUL))
|
||||||
|
escape_fname(&p);
|
||||||
|
|
||||||
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -676,6 +676,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2,
|
||||||
/**/
|
/**/
|
||||||
1,
|
1,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user