diff options
author | zeertzjq <zeertzjq@outlook.com> | 2021-11-19 20:07:04 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2021-11-19 20:07:04 +0800 |
commit | 349b9ce9df0c7f48ce236216ab0d2c507f483425 (patch) | |
tree | 8795fb887099a5ed4384fc4996cd8cc595fdc390 /test/functional/legacy/autochdir_spec.lua | |
parent | 3d504f27a002b3ce6acf75398789a37611b35c44 (diff) | |
download | rneovim-349b9ce9df0c7f48ce236216ab0d2c507f483425.tar.gz rneovim-349b9ce9df0c7f48ce236216ab0d2c507f483425.tar.bz2 rneovim-349b9ce9df0c7f48ce236216ab0d2c507f483425.zip |
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.
Diffstat (limited to 'test/functional/legacy/autochdir_spec.lua')
-rw-r--r-- | test/functional/legacy/autochdir_spec.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/functional/legacy/autochdir_spec.lua b/test/functional/legacy/autochdir_spec.lua index 9bb13c1954..37a94476a0 100644 --- a/test/functional/legacy/autochdir_spec.lua +++ b/test/functional/legacy/autochdir_spec.lua @@ -28,6 +28,7 @@ describe('autochdir behavior', function() it(':verbose pwd shows whether autochdir is used', function() local subdir = 'Xautodir' command('cd '..dir) + local cwd = eval('getcwd()') command('edit global.txt') matches('%[global%].*'..dir, exec_capture('verbose pwd')) call('mkdir', subdir) @@ -37,6 +38,14 @@ describe('autochdir behavior', function() command('set autochdir') command('wincmd w') matches('%[autochdir%].*'..dir, exec_capture('verbose pwd')) + command('lcd '..cwd) + matches('%[window%].*'..dir, exec_capture('verbose pwd')) + command('tcd '..cwd) + matches('%[tabpage%].*'..dir, exec_capture('verbose pwd')) + command('cd '..cwd) + matches('%[global%].*'..dir, exec_capture('verbose pwd')) + command('edit') + matches('%[autochdir%].*'..dir, exec_capture('verbose pwd')) command('wincmd w') matches('%[autochdir%].*'..dir..'[/\\]'..subdir, exec_capture('verbose pwd')) command('set noautochdir') |