mirror of
https://github.com/neovim/neovim.git
synced 2025-09-08 12:28:18 +00:00
fix(terminal): make backslashes in 'shell' work on Windows
If backslashes are used in 'shell' option, escape them to make Terminal mode work.
This commit is contained in:
@@ -7424,7 +7424,9 @@ static void ex_terminal(exarg_T *eap)
|
|||||||
char shell_argv[512] = { 0 };
|
char shell_argv[512] = { 0 };
|
||||||
|
|
||||||
while (*p != NULL) {
|
while (*p != NULL) {
|
||||||
snprintf(tempstring, sizeof(tempstring), ",\"%s\"", *p);
|
char *escaped = vim_strsave_escaped(*p, "\"\\");
|
||||||
|
snprintf(tempstring, sizeof(tempstring), ",\"%s\"", escaped);
|
||||||
|
xfree(escaped);
|
||||||
xstrlcat(shell_argv, tempstring, sizeof(shell_argv));
|
xstrlcat(shell_argv, tempstring, sizeof(shell_argv));
|
||||||
p++;
|
p++;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user