bug: plugins lazy loaded with autocmd events don't always execute their events when loaded #858
Closed
3 tasks done
Labels
bug
Something isn't working
Did you check docs and existing issues?
Neovim version (nvim -v)
0.9.0
Operating system/version
MacOS 13.4
Describe the bug
When a plugin is lazy loaded using an autocmd event and also has the same type but broader event on plugin startup, the event does not run. Some plugins will not work properly when this happens since their startup code is not properly set up. An example is a plugin that is loaded by
event = "BufReadPost *.md"
but also hasautocmd BufReadPost *
on their startup codeI think this happens because in this line
pattern = pattern
is used to filter for any new autocmds that have been created from loading the plugin, but filtering by the specific pattern will ignore the more broader patternsSteps To Reproduce
event = "BufReadPost *.md"
Expected Behavior
The plugin is expected run matching autocmds when it loads, but does not
Repro
The text was updated successfully, but these errors were encountered: