comparison src/testdir/test_autochdir.vim @ 27976:d265246e6628 v8.2.4513

patch 8.2.4513: window-local directory is not applied if 'acd' fails Commit: https://github.com/vim/vim/commit/b29ae159777028bb3266835b55716749ab0515be Author: zeertzjq <zeertzjq@outlook.com> Date: Sat Mar 5 17:00:31 2022 +0000 patch 8.2.4513: window-local directory is not applied if 'acd' fails Problem: Window-local directory is not applied if 'acd' fails. Solution: Don't call do_autochdir(). (closes https://github.com/vim/vim/issues/9891)
author Bram Moolenaar <Bram@vim.org>
date Sat, 05 Mar 2022 18:15:02 +0100
parents 2d7691a945d1
children c8b1a683323c
comparison
equal deleted inserted replaced
27975:6c7a0523dc73 27976:d265246e6628
84 call assert_match('\[window\].*testdir[/\\]Xautodir', execute('verbose pwd')) 84 call assert_match('\[window\].*testdir[/\\]Xautodir', execute('verbose pwd'))
85 85
86 set acd 86 set acd
87 wincmd w 87 wincmd w
88 call assert_match('\[autochdir\].*testdir$', execute('verbose pwd')) 88 call assert_match('\[autochdir\].*testdir$', execute('verbose pwd'))
89 execute 'lcd' cwd
90 call assert_match('\[window\].*testdir$', execute('verbose pwd'))
91 execute 'tcd' cwd 89 execute 'tcd' cwd
92 call assert_match('\[tabpage\].*testdir$', execute('verbose pwd')) 90 call assert_match('\[tabpage\].*testdir$', execute('verbose pwd'))
93 execute 'cd' cwd 91 execute 'cd' cwd
94 call assert_match('\[global\].*testdir$', execute('verbose pwd')) 92 call assert_match('\[global\].*testdir$', execute('verbose pwd'))
93 execute 'lcd' cwd
94 call assert_match('\[window\].*testdir$', execute('verbose pwd'))
95 edit 95 edit
96 call assert_match('\[autochdir\].*testdir$', execute('verbose pwd')) 96 call assert_match('\[autochdir\].*testdir$', execute('verbose pwd'))
97 enew
98 wincmd w
99 call assert_match('\[autochdir\].*testdir[/\\]Xautodir', execute('verbose pwd'))
100 wincmd w
101 call assert_match('\[window\].*testdir$', execute('verbose pwd'))
97 wincmd w 102 wincmd w
98 call assert_match('\[autochdir\].*testdir[/\\]Xautodir', execute('verbose pwd')) 103 call assert_match('\[autochdir\].*testdir[/\\]Xautodir', execute('verbose pwd'))
99 set noacd 104 set noacd
100 call assert_match('\[autochdir\].*testdir[/\\]Xautodir', execute('verbose pwd')) 105 call assert_match('\[autochdir\].*testdir[/\\]Xautodir', execute('verbose pwd'))
101 wincmd w 106 wincmd w
102 call assert_match('\[autochdir\].*testdir[/\\]Xautodir', execute('verbose pwd')) 107 call assert_match('\[window\].*testdir$', execute('verbose pwd'))
103 execute 'cd' cwd 108 execute 'cd' cwd
104 call assert_match('\[global\].*testdir', execute('verbose pwd')) 109 call assert_match('\[global\].*testdir$', execute('verbose pwd'))
105 wincmd w 110 wincmd w
106 call assert_match('\[window\].*testdir[/\\]Xautodir', execute('verbose pwd')) 111 call assert_match('\[window\].*testdir[/\\]Xautodir', execute('verbose pwd'))
107 112
108 bwipe! 113 bwipe!
109 call chdir(cwd) 114 call chdir(cwd)