Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Conversation

winstliu
Copy link
Contributor

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • All new code requires tests to ensure against regressions

Description of the Change

Before, loaded was a global variable. This meant that once it was set to true it would stay true forever, even after deactivating and reactivating snippets. This PR changes it to an instance variable so that its state is reset correctly across activations.

Alternate Designs

None.

Benefits

This makes the bundledSnippetsLoaded method of provideSnippets() much more reliable, as previously it would return the wrong value if snippets was deactivated then reactivated.

Possible Drawbacks

None.

Applicable Issues

Refs atom/settings-view#998, in which I have been experimenting with using bundledSnippetsLoaded.

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