vim-qf icon indicating copy to clipboard operation
vim-qf copied to clipboard

Clear qf buffer autocmds before adding new ones

Open nickspoons opened this issue 1 year ago • 1 comments

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.

nickspoons avatar Aug 18 '23 01:08 nickspoons

This presumably only became an issue in vim 8.1.0877 due to this commit

nickspoons avatar Aug 18 '23 01:08 nickspoons