0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

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

@@ -291,6 +291,7 @@
#endif
#ifdef BACKSLASH_IN_FILENAME
# define PATH_ESC_CHARS ((char_u *)" \t\n*?[{`%#'\"|!<")
# define BUFFER_ESC_CHARS ((char_u *)" \t\n*?[`%#'\"|!<")
#else
# ifdef VMS
// VMS allows a lot of characters in the file name
@@ -300,6 +301,7 @@
# define PATH_ESC_CHARS ((char_u *)" \t\n*?[{`$\\%#'\"|!<")
# define SHELL_ESC_CHARS ((char_u *)" \t\n*?[{`$\\%#'\"|!<>();&")
# endif
# define BUFFER_ESC_CHARS ((char_u *)" \t\n*?[`$\\%#'\"|!<")
#endif
// length of a buffer to store a number in ASCII (64 bits binary + NUL)
@@ -2766,5 +2768,9 @@ long elapsed(DWORD start_tick);
#define UC_BUFFER 1 // -buffer: local to current buffer
#define UC_VIM9 2 // {} argument: Vim9 syntax.
// flags used by vim_strsave_escaped()
#define VSE_NONE 0
#define VSE_SHELL 1 // escape for a shell command
#define VSE_BUFFER 2 // escape for a ":buffer" command
#endif // VIM__H