To: vim_dev@googlegroups.com Subject: Patch 8.2.4513 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4513 Problem: Window-local directory is not applied if 'acd' fails. Solution: Don't call do_autochdir(). (closes #9891) Files: src/window.c, src/testdir/test_autochdir.vim *** ../vim-8.2.4512/src/window.c 2022-02-24 12:33:13.151233722 +0000 --- src/window.c 2022-03-05 16:56:30.857807710 +0000 *************** *** 4772,4782 **** static void fix_current_dir(void) { - #ifdef FEAT_AUTOCHDIR - if (p_acd) - do_autochdir(); - else - #endif if (curwin->w_localdir != NULL || curtab->tp_localdir != NULL) { char_u *dirname; --- 4772,4777 ---- *** ../vim-8.2.4512/src/testdir/test_autochdir.vim 2022-02-19 14:49:48.063417489 +0000 --- src/testdir/test_autochdir.vim 2022-03-05 16:56:30.857807710 +0000 *************** *** 86,107 **** set acd wincmd w call assert_match('\[autochdir\].*testdir$', execute('verbose pwd')) - execute 'lcd' cwd - call assert_match('\[window\].*testdir$', execute('verbose pwd')) execute 'tcd' cwd call assert_match('\[tabpage\].*testdir$', execute('verbose pwd')) execute 'cd' cwd call assert_match('\[global\].*testdir$', execute('verbose pwd')) edit call assert_match('\[autochdir\].*testdir$', execute('verbose pwd')) wincmd w call assert_match('\[autochdir\].*testdir[/\\]Xautodir', execute('verbose pwd')) set noacd call assert_match('\[autochdir\].*testdir[/\\]Xautodir', execute('verbose pwd')) wincmd w ! call assert_match('\[autochdir\].*testdir[/\\]Xautodir', execute('verbose pwd')) execute 'cd' cwd ! call assert_match('\[global\].*testdir', execute('verbose pwd')) wincmd w call assert_match('\[window\].*testdir[/\\]Xautodir', execute('verbose pwd')) --- 86,112 ---- set acd wincmd w call assert_match('\[autochdir\].*testdir$', execute('verbose pwd')) execute 'tcd' cwd call assert_match('\[tabpage\].*testdir$', execute('verbose pwd')) execute 'cd' cwd call assert_match('\[global\].*testdir$', execute('verbose pwd')) + execute 'lcd' cwd + call assert_match('\[window\].*testdir$', execute('verbose pwd')) edit call assert_match('\[autochdir\].*testdir$', execute('verbose pwd')) + enew + wincmd w + call assert_match('\[autochdir\].*testdir[/\\]Xautodir', execute('verbose pwd')) + wincmd w + call assert_match('\[window\].*testdir$', execute('verbose pwd')) wincmd w call assert_match('\[autochdir\].*testdir[/\\]Xautodir', execute('verbose pwd')) set noacd call assert_match('\[autochdir\].*testdir[/\\]Xautodir', execute('verbose pwd')) wincmd w ! call assert_match('\[window\].*testdir$', execute('verbose pwd')) execute 'cd' cwd ! call assert_match('\[global\].*testdir$', execute('verbose pwd')) wincmd w call assert_match('\[window\].*testdir[/\\]Xautodir', execute('verbose pwd')) *** ../vim-8.2.4512/src/version.c 2022-03-05 14:35:07.319171786 +0000 --- src/version.c 2022-03-05 16:58:11.077628035 +0000 *************** *** 756,757 **** --- 756,759 ---- { /* Add new patch number below this line */ + /**/ + 4513, /**/ -- If Microsoft would build a car... ... the oil, water temperature, and alternator warning lights would all be replaced by a single "General Protection Fault" warning light. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///