Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Auto-Closing Pairs: Fix race condition on initial buffer enter #1273

Merged
merged 2 commits into from
Jan 12, 2018

Conversation

bryphe
Copy link
Member

@bryphe bryphe commented Jan 11, 2018

Issue: Looking at automation logs, it seems that there are cases where auto-closing pairs may not be activated for the very first buffer. I believe this may be a 'real' issue, because I believe I have seen this when running via npm run start too.

Defect: The AutoClosingPairs service assumes that any BufferEnter event will come after it is initialized, but this actually isn't a guarantee - we may have passed a file for Neovim to open on startup, for example.

Fix: When we activate auto closing pairs, if there is an active buffer currently, we should handle that too.

@bryphe bryphe merged commit e85be79 into master Jan 12, 2018
@bryphe bryphe deleted the bryphe/automation/auto-closing-pairs-race branch January 12, 2018 04:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant