diff src/vim.h @ 25994:e8873138ffbb v8.2.3530

patch 8.2.3530: ":buf {a}" fails while ":edit {a}" works Commit: https://github.com/vim/vim/commit/21c1a0c2f10575dbb72fa873d33f0c1f6e170aa7 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Oct 17 17:20:23 2021 +0100 patch 8.2.3530: ":buf \{a}" fails while ":edit \{a}" works Problem: ":buf \{a}" fails while ":edit \{a}" works. Solution: Unescape "\{". (closes https://github.com/vim/vim/issues/8917)
author Bram Moolenaar <Bram@vim.org>
date Sun, 17 Oct 2021 18:30:04 +0200
parents 16a7d1154be8
children db9fdfb86679
line wrap: on
line diff
--- 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