mirror of
https://github.com/vim/vim.git
synced 2025-07-25 10:54:51 -04:00
updated for version 7.3.061
Problem: Remote ":drop" does not respect 'autochdir'. (Peter Odding) Solution: Don't restore the directory when 'autochdir' is set. (Benjamin Fritz)
This commit is contained in:
parent
7ad7d01074
commit
00b78c17b2
17
src/main.c
17
src/main.c
@ -3817,6 +3817,8 @@ build_drop_cmd(filec, filev, tabs, sendReply)
|
|||||||
/* Check if we have at least one argument. */
|
/* Check if we have at least one argument. */
|
||||||
if (filec <= 0)
|
if (filec <= 0)
|
||||||
mainerr_arg_missing((char_u *)filev[-1]);
|
mainerr_arg_missing((char_u *)filev[-1]);
|
||||||
|
|
||||||
|
/* Temporarily cd to the current directory to handle relative file names. */
|
||||||
if (mch_dirname(cwd, MAXPATHL) != OK)
|
if (mch_dirname(cwd, MAXPATHL) != OK)
|
||||||
return NULL;
|
return NULL;
|
||||||
if ((p = vim_strsave_escaped_ext(cwd,
|
if ((p = vim_strsave_escaped_ext(cwd,
|
||||||
@ -3858,13 +3860,20 @@ build_drop_cmd(filec, filev, tabs, sendReply)
|
|||||||
ga_concat(&ga, p);
|
ga_concat(&ga, p);
|
||||||
vim_free(p);
|
vim_free(p);
|
||||||
}
|
}
|
||||||
|
ga_concat(&ga, (char_u *)"|if exists('*inputrestore')|call inputrestore()|endif<CR>");
|
||||||
|
|
||||||
/* The :drop commands goes to Insert mode when 'insertmode' is set, use
|
/* The :drop commands goes to Insert mode when 'insertmode' is set, use
|
||||||
* CTRL-\ CTRL-N again. */
|
* CTRL-\ CTRL-N again. */
|
||||||
ga_concat(&ga, (char_u *)"|if exists('*inputrestore')|call inputrestore()|endif<CR>");
|
ga_concat(&ga, (char_u *)"<C-\\><C-N>");
|
||||||
ga_concat(&ga, (char_u *)"<C-\\><C-N>:cd -");
|
|
||||||
|
/* Switch back to the correct current directory (prior to temporary path
|
||||||
|
* switch) unless 'autochdir' is set, in which case it will already be
|
||||||
|
* correct after the :drop command. */
|
||||||
|
ga_concat(&ga, (char_u *)":if !exists('+acd')||!&acd|cd -|endif<CR>");
|
||||||
|
|
||||||
if (sendReply)
|
if (sendReply)
|
||||||
ga_concat(&ga, (char_u *)"<CR>:call SetupRemoteReplies()");
|
ga_concat(&ga, (char_u *)":call SetupRemoteReplies()<CR>");
|
||||||
ga_concat(&ga, (char_u *)"<CR>:");
|
ga_concat(&ga, (char_u *)":");
|
||||||
if (inicmd != NULL)
|
if (inicmd != NULL)
|
||||||
{
|
{
|
||||||
/* Can't use <CR> after "inicmd", because an "startinsert" would cause
|
/* Can't use <CR> after "inicmd", because an "startinsert" would cause
|
||||||
|
@ -714,6 +714,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
61,
|
||||||
/**/
|
/**/
|
||||||
60,
|
60,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user