vim-patch:8.2.4345: <amatch> is expanded like a file name for DirChangedPre

Problem:    <amatch> is expanded like a file name for DirChangedPre.
Solution:   Do not expand <amatch>. (closes vim/vim#9742)  Also for the User event.
f6246f51e3
This commit is contained in:
zeertzjq
2022-02-17 06:08:13 +08:00
parent 4646ea1079
commit 7b048df4dc
2 changed files with 12 additions and 3 deletions

View File

@@ -1523,7 +1523,8 @@ static bool apply_autocmds_group(event_T event, char_u *fname, char_u *fname_io,
|| event == EVENT_QUICKFIXCMDPOST || event == EVENT_QUICKFIXCMDPRE
|| event == EVENT_REMOTEREPLY || event == EVENT_SPELLFILEMISSING
|| event == EVENT_SYNTAX || event == EVENT_SIGNAL
|| event == EVENT_TABCLOSED || event == EVENT_WINCLOSED) {
|| event == EVENT_TABCLOSED || event == EVENT_USER
|| event == EVENT_WINCLOSED) {
fname = vim_strsave(fname);
} else {
fname = (char_u *)FullName_save((char *)fname, false);