Skip to content

Clear qf buffer autocmds before adding new ones#131

Open
nickspoons wants to merge 1 commit into
romainl:masterfrom
nickspoons:bugfix/clear-autocmds
Open

Clear qf buffer autocmds before adding new ones#131
nickspoons wants to merge 1 commit into
romainl:masterfrom
nickspoons:bugfix/clear-autocmds

Conversation

@nickspoons

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant