vim-qf
vim-qf copied to clipboard
Clear qf buffer autocmds before adding new ones
Currently, each time the quickfix window is opened, an extra BufEnter
and BufWinEnter
autocmd is added. This can be demonstrated (after opening the quickfix/locationlist windows a few times) with this command, which should only output a single unique line for each buffer/event:
echo autocmd_get(#{group: 'qf', event: 'BufEnter'})->map({k,v->$'{v.event} {v.bufnr}: {v.cmd}'})->join("\n")
This change removes the buffer's existing autocmds before creating the new ones.
This presumably only became an issue in vim 8.1.0877 due to this commit