summaryrefslogtreecommitdiffstats
path: root/src/vim.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-10-17 17:20:23 +0100
committerBram Moolenaar <Bram@vim.org>2021-10-17 17:20:23 +0100
commit21c1a0c2f10575dbb72fa873d33f0c1f6e170aa7 (patch)
treeab2a99240a83610e85c5d2632553266406d983ef /src/vim.h
parent34a364877f0c726cdc0779e6999fded9ba959ebe (diff)
patch 8.2.3530: ":buf \{a}" fails while ":edit \{a}" worksv8.2.3530
Problem: ":buf \{a}" fails while ":edit \{a}" works. Solution: Unescape "\{". (closes #8917)
Diffstat (limited to 'src/vim.h')
-rw-r--r--src/vim.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vim.h b/src/vim.h
index b7a6388280..d2e0d9be35 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -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