diff options
author | Gregory Anders <8965202+gpanders@users.noreply.github.com> | 2022-01-05 09:50:54 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-05 09:50:54 -0700 |
commit | f40ce3456313138f2e0f822da9676ed3bc51f608 (patch) | |
tree | fe255279c898902a601e182e97092dc540f80736 /runtime/syntax/gitcommit.vim | |
parent | 55a59e56eda98f17448a1c318a346ae12d30fc05 (diff) | |
download | rneovim-f40ce3456313138f2e0f822da9676ed3bc51f608.tar.gz rneovim-f40ce3456313138f2e0f822da9676ed3bc51f608.tar.bz2 rneovim-f40ce3456313138f2e0f822da9676ed3bc51f608.zip |
fix(filetype): match on <afile> rather than <abuf> (#16943)
Filetype detection runs on BufRead and BufNewFile autocommands, both of
which can fire without an underlying buffer, so it's incorrect to use
<abuf> to determine the file path. Instead, match on <afile> and assume
that the buffer we're operating on is the current buffer. This is the
same assumption that filetype.vim makes, so it should be safe.
Diffstat (limited to 'runtime/syntax/gitcommit.vim')
0 files changed, 0 insertions, 0 deletions