mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 22:18:33 +00:00
refactor: replace char_u with char 20 (#21714)
refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
This commit is contained in:
@@ -3964,18 +3964,16 @@ char *vim_strsave_fnameescape(const char *const fname, const int what)
|
||||
char *p = (char *)vim_strsave_escaped((const char_u *)fname,
|
||||
(const char_u *)buf);
|
||||
#else
|
||||
# define PATH_ESC_CHARS ((char_u *)" \t\n*?[{`$\\%#'\"|!<")
|
||||
# define SHELL_ESC_CHARS ((char_u *)" \t\n*?[{`$\\%#'\"|!<>();&")
|
||||
# define BUFFER_ESC_CHARS ((char_u *)" \t\n*?[`$\\%#'\"|!<")
|
||||
char *p =
|
||||
(char *)vim_strsave_escaped((const char_u *)fname,
|
||||
what == VSE_SHELL ? SHELL_ESC_CHARS
|
||||
: what == VSE_BUFFER ? BUFFER_ESC_CHARS : PATH_ESC_CHARS);
|
||||
# define PATH_ESC_CHARS " \t\n*?[{`$\\%#'\"|!<"
|
||||
# define SHELL_ESC_CHARS " \t\n*?[{`$\\%#'\"|!<>();&"
|
||||
# define BUFFER_ESC_CHARS " \t\n*?[`$\\%#'\"|!<"
|
||||
char *p = vim_strsave_escaped(fname,
|
||||
what == VSE_SHELL ? SHELL_ESC_CHARS : what ==
|
||||
VSE_BUFFER ? BUFFER_ESC_CHARS : PATH_ESC_CHARS);
|
||||
if (what == VSE_SHELL && csh_like_shell()) {
|
||||
// For csh and similar shells need to put two backslashes before '!'.
|
||||
// One is taken by Vim, one by the shell.
|
||||
char *s = (char *)vim_strsave_escaped((const char_u *)p,
|
||||
(const char_u *)"!");
|
||||
char *s = vim_strsave_escaped(p, "!");
|
||||
xfree(p);
|
||||
p = s;
|
||||
}
|
||||
|
Reference in New Issue
Block a user