From 349b9ce9df0c7f48ce236216ab0d2c507f483425 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 19 Nov 2021 20:07:04 +0800 Subject: vim-patch:8.2.3622: "verbose pwd" shows confusing info 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 vim/vim#9160) https://github.com/vim/vim/commit/64be6aa3a54ecfe355d4a03e1200650c301e7f29 This only ports the tests, as this is already Nvim's behavior. --- src/nvim/testdir/test_autochdir.vim | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/nvim/testdir/test_autochdir.vim b/src/nvim/testdir/test_autochdir.vim index e172d0cb9a..9ad727241e 100644 --- a/src/nvim/testdir/test_autochdir.vim +++ b/src/nvim/testdir/test_autochdir.vim @@ -42,6 +42,14 @@ func Test_verbose_pwd() 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 -- cgit