Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clear buffer-local autocmds correctly #2109

Merged
merged 1 commit into from
Jan 2, 2019

Conversation

bhcleek
Copy link
Collaborator

@bhcleek bhcleek commented Dec 29, 2018

Clear buffer-local autocmds correctly without clearing the same autocmds
for other buffers.

As an example of why this should be done: prior to this change, opening
a window for each of two separate files and then running :GoCoverage
in each would highlight coverage as expected. Loading a third buffer
into one of the windows would clear the highlighting in that window and
would also remove the other window's buffer-local autocmd event to
clear its coverage highlighting. Loading a different buffer into the
other window would unexpectedly keep the highlighting, because the
autocmd event configuration was removed when the third buffer was loaded
into its window.

Clear buffer-local autocmds correctly without clearing the same autocmds
for other buffers.

As an example of why this should be done: prior to this change, opening
a window for each of two separate files and then running `:GoCoverage`
in each would highlight coverage as expected. Loading a third buffer
into one of the windows would clear the highlighting in that window and
would _also_ remove the other window's buffer-local autocmd event to
clear its coverage highlighting. Loading a different buffer into the
other window would unexpectedly _keep_ the highlighting, because the
autocmd event configuration was removed when the third buffer was loaded
into its window.
@bhcleek bhcleek merged commit 59edda8 into fatih:master Jan 2, 2019
@bhcleek bhcleek deleted the clear-buffer-autocmds branch January 2, 2019 17:16
bhcleek added a commit that referenced this pull request Jan 2, 2019
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