1
0
forked from aniani/vim

patch 8.2.3530: ":buf \{a}" fails while ":edit \{a}" works

Problem:    ":buf \{a}" fails while ":edit \{a}" works.
Solution:   Unescape "\{". (closes #8917)
This commit is contained in:
Bram Moolenaar
2021-10-17 17:20:23 +01:00
parent 34a364877f
commit 21c1a0c2f1
11 changed files with 38 additions and 15 deletions

View File

@@ -48,6 +48,8 @@ ExpandEscape(
{
int i;
char_u *p;
int vse_what = xp->xp_context == EXPAND_BUFFERS
? VSE_BUFFER : VSE_NONE;
// May change home directory back to "~"
if (options & WILD_HOME_REPLACE)
@@ -84,9 +86,10 @@ ExpandEscape(
}
}
#ifdef BACKSLASH_IN_FILENAME
p = vim_strsave_fnameescape(files[i], FALSE);
p = vim_strsave_fnameescape(files[i], vse_what);
#else
p = vim_strsave_fnameescape(files[i], xp->xp_shell);
p = vim_strsave_fnameescape(files[i],
xp->xp_shell ? VSE_SHELL : vse_what);
#endif
if (p != NULL)
{