File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4368,8 +4368,22 @@ do_ecmd(
43684368 if (p_im )
43694369 need_start_insertmode = TRUE;
43704370
4371- /* Change directories when the 'acd' option is set. */
4372- DO_AUTOCHDIR
4371+ #ifdef FEAT_AUTOCHDIR
4372+ /* Change directories when the 'acd' option is set and we aren't already in
4373+ * that directory (should already be done above). Expect getcwd() to be
4374+ * faster than calling shorten_fnames() unnecessarily. */
4375+ if (p_acd && curbuf -> b_ffname != NULL )
4376+ {
4377+ char_u curdir [MAXPATHL ];
4378+ char_u filedir [MAXPATHL ];
4379+
4380+ vim_strncpy (filedir , curbuf -> b_ffname , MAXPATHL - 1 );
4381+ * gettail_sep (filedir ) = NUL ;
4382+ if (mch_dirname (curdir , MAXPATHL ) != FAIL
4383+ && vim_fnamecmp (curdir , filedir ) != 0 )
4384+ do_autochdir ();
4385+ }
4386+ #endif
43734387
43744388#if defined(FEAT_SUN_WORKSHOP ) || defined(FEAT_NETBEANS_INTG )
43754389 if (curbuf -> b_ffname != NULL )
Original file line number Diff line number Diff line change @@ -771,6 +771,8 @@ static char *(features[]) =
771771
772772static int included_patches [] =
773773{ /* Add new patch number below this line */
774+ /**/
775+ 1461 ,
774776/**/
775777 1460 ,
776778/**/
You can’t perform that action at this time.
0 commit comments