1
0
forked from aniani/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 #9742)  Also for the User event.
This commit is contained in:
Bram Moolenaar
2022-02-11 16:30:12 +00:00
parent 14f23122bf
commit f6246f51e3
3 changed files with 15 additions and 3 deletions

View File

@@ -2043,7 +2043,7 @@ apply_autocmds_group(
{
sfname = vim_strsave(fname);
// Don't try expanding FileType, Syntax, FuncUndefined, WindowID,
// ColorScheme, QuickFixCmd* or DirChanged
// ColorScheme, QuickFixCmd*, DirChanged and similar.
if (event == EVENT_FILETYPE
|| event == EVENT_SYNTAX
|| event == EVENT_CMDLINECHANGED
@@ -2061,7 +2061,9 @@ apply_autocmds_group(
|| event == EVENT_OPTIONSET
|| event == EVENT_QUICKFIXCMDPOST
|| event == EVENT_DIRCHANGED
|| event == EVENT_DIRCHANGEDPRE
|| event == EVENT_MODECHANGED
|| event == EVENT_USER
|| event == EVENT_WINCLOSED)
{
fname = vim_strsave(fname);