Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: don't clear rules after closing floating win (#342)
When `BufDelete` is triggered after closing a floating window such as one from `vim-floaterm`, the `bufnr` the event gets is that of the file you're editing, not the buffer for the terminal, which is causing this autocommand to clear the rules for the current file. Making sure the buffer we're clearing rules for isn't the buffer we're currently on fixes the issue for me, and seems to make sense because I would imagine the buffer we're currently looking at isn't the buffer that we just deleted and thus triggered a `BufDelete` event.
- Loading branch information