zeertzjq
059d36e326
feat(events): add DirChangedPre
...
In Nvim, like DirChanged, this also triggers when switching windows.
This marks Vim patch 8.2.4335 as ported.
vim-patch:8.2.4335: no autocommand event triggered before changing directory
Problem: No autocommand event triggered before changing directory. (Ronnie
Magatti)
Solution: Add DirChangedPre. (closes vim/vim#9721 )
28e8f73ae2
2022-02-11 12:55:58 +08:00
zeertzjq
38821cc50e
test(dirchanged): add tests for DirChanged pattern "auto"
2021-10-17 22:04:53 +08:00
zeertzjq
6004f9137a
refactor(dirchanged): tab -> tabpage
...
Match Vim's behavior.
2021-10-17 22:04:53 +08:00
zeertzjq
57651df9c1
vim-patch:8.1.0604: autocommand test fails on MS-Windows
...
Problem: Autocommand test fails on MS-Windows.
Solution: Use pathcmp() instead of strcmp() to check if a directory differs.
9eb76af451
2021-10-17 22:04:53 +08:00
zeertzjq
e91dee5c21
vim-patch:8.1.0602: DirChanged is also triggered when directory didn't change
...
Problem: DirChanged is also triggered when the directory didn't change.
(Daniel Hahler)
Solution: Compare the current with the new directory. (closes vim/vim#3697 )
2caad3fbbd
2021-10-17 22:04:53 +08:00
Andrea Cedraro
4c7ad9527d
Add v:event flag on DirChanged signaling switching window ( #13153 )
...
Closes #9909
2020-11-07 12:02:06 -05:00
Marco Hinz
cca407b43e
DirChanged: support <buffer> ( #8140 )
2018-03-16 07:29:20 +01:00
Justin M. Keyes
c5e61b41a5
DirChanged: avoid redundant events on 'autochdir'
2017-03-12 15:45:50 +01:00
Justin M. Keyes
d9fcbc2cfb
DirChanged: trigger when switching scopes
...
Closes #6054
2017-03-12 14:39:32 +01:00
Justin M. Keyes
99a1a58c66
DirChanged: Publish _after_ updating win/tab CWD.
...
So getcwd() works correctly during DirChanged event.
Closes #6260
2017-03-12 14:39:32 +01:00
Justin M. Keyes
be4c896845
DirChanged: set <amatch> ( #5961 )
...
Also:
- test that DirChanged is not recursive
- fix 'not trigger if :cd fails' test on Windows
2017-01-17 10:47:20 +01:00
Marco Hinz
a2f8adad4c
Add autocmd/dirchanged_spec.lua
2017-01-13 15:29:05 +01:00