mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.0.1459: cannot handle change of directory
Problem: Cannot handle change of directory. Solution: Add the DirChanged autocommand event. (Andy Massimino, closes #888) Avoid changing directory for 'autochdir' too often.
This commit is contained in:
@@ -264,7 +264,7 @@ main
|
||||
* Hint: to avoid this when typing a command use a forward slash.
|
||||
* If the cd fails, it doesn't matter.
|
||||
*/
|
||||
(void)vim_chdirfile(params.fname);
|
||||
(void)vim_chdirfile(params.fname, "drop");
|
||||
if (start_dir != NULL)
|
||||
mch_dirname(start_dir, MAXPATHL);
|
||||
}
|
||||
@@ -314,7 +314,7 @@ main
|
||||
&& STRCMP(NameBuff, "/") == 0)
|
||||
{
|
||||
if (params.fname != NULL)
|
||||
(void)vim_chdirfile(params.fname);
|
||||
(void)vim_chdirfile(params.fname, "drop");
|
||||
else
|
||||
{
|
||||
expand_env((char_u *)"$HOME", NameBuff, MAXPATHL);
|
||||
|
Reference in New Issue
Block a user