mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
updated for version 7.3.161
Problem: Items on the stack may be too big. Solution: Make items static or allocate them.
This commit is contained in:
16
src/main.c
16
src/main.c
@@ -3814,7 +3814,7 @@ build_drop_cmd(filec, filev, tabs, sendReply)
|
||||
int i;
|
||||
char_u *inicmd = NULL;
|
||||
char_u *p;
|
||||
char_u cwd[MAXPATHL];
|
||||
char_u *cwd;
|
||||
|
||||
if (filec > 0 && filev[0][0] == '+')
|
||||
{
|
||||
@@ -3827,15 +3827,23 @@ build_drop_cmd(filec, filev, tabs, sendReply)
|
||||
mainerr_arg_missing((char_u *)filev[-1]);
|
||||
|
||||
/* Temporarily cd to the current directory to handle relative file names. */
|
||||
if (mch_dirname(cwd, MAXPATHL) != OK)
|
||||
cwd = alloc(MAXPATHL);
|
||||
if (cwd == NULL)
|
||||
return NULL;
|
||||
if ((p = vim_strsave_escaped_ext(cwd,
|
||||
if (mch_dirname(cwd, MAXPATHL) != OK)
|
||||
{
|
||||
vim_free(cwd);
|
||||
return NULL;
|
||||
}
|
||||
p = vim_strsave_escaped_ext(cwd,
|
||||
#ifdef BACKSLASH_IN_FILENAME
|
||||
"", /* rem_backslash() will tell what chars to escape */
|
||||
#else
|
||||
PATH_ESC_CHARS,
|
||||
#endif
|
||||
'\\', TRUE)) == NULL)
|
||||
'\\', TRUE);
|
||||
vim_free(cwd);
|
||||
if (p == NULL)
|
||||
return NULL;
|
||||
ga_init2(&ga, 1, 100);
|
||||
ga_concat(&ga, (char_u *)"<C-\\><C-N>:cd ");
|
||||
|
Reference in New Issue
Block a user