To: vim_dev@googlegroups.com Subject: Patch 8.2.3622 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.3622 Problem: "verbose pwd" shows confusing info when :lcd does not change directory. Solution: Clear last_chdir_reason also when the directory does not change. (closes #9160) Files: src/ex_docmd.c, src/testdir/test_autochdir.vim *** ../vim-8.2.3621/src/ex_docmd.c 2021-11-18 18:52:08.824648758 +0000 --- src/ex_docmd.c 2021-11-19 11:56:16.892007073 +0000 *************** *** 7301,7306 **** --- 7301,7307 ---- VIM_CLEAR(globaldir); } + last_chdir_reason = NULL; shorten_fnames(TRUE); } *************** *** 7390,7396 **** if (dir_differs) { - last_chdir_reason = NULL; if (scope == CDSCOPE_WINDOW) acmd_fname = (char_u *)"window"; else if (scope == CDSCOPE_TABPAGE) --- 7391,7396 ---- *** ../vim-8.2.3621/src/testdir/test_autochdir.vim 2021-11-18 18:52:08.828648753 +0000 --- src/testdir/test_autochdir.vim 2021-11-19 11:56:16.892007073 +0000 *************** *** 40,45 **** --- 40,53 ---- 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 *** ../vim-8.2.3621/src/version.c 2021-11-19 11:35:28.886137594 +0000 --- src/version.c 2021-11-19 11:58:45.715722716 +0000 *************** *** 759,760 **** --- 759,762 ---- { /* Add new patch number below this line */ + /**/ + 3622, /**/ -- Two cows are standing together in a field. One asks the other: "So what do you think about this Mad Cow Disease?" The other replies: "That doesn't concern me. I'm a helicopter." /// 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 ///