Skip to content

Fix bug causing completion handlers to sometimes return old results#1361

Merged
JacksonKearl merged 2 commits intomasterfrom
debouncing-big
Jun 24, 2019
Merged

Fix bug causing completion handlers to sometimes return old results#1361
JacksonKearl merged 2 commits intomasterfrom
debouncing-big

Conversation

@JacksonKearl
Copy link
Copy Markdown

@JacksonKearl JacksonKearl commented Jun 24, 2019

Previously the debouncer was configured as trailing, which meant that the first n-1 calls in a batch of n calls would get old data, and the last one would get new data.

Practically speaking, this meant that a new call for completion items would give the results of the last call for completion items, and a user could only get updated completion items after calling for them twice, more than 400ms apart.

This fixes that by setting the debouncer to be leading, which means that the first call in a new batch executes, and the remaining calls in the batch get it's results.

TODO:

  • Update CHANGELOG.md* with your change (include reference to issue & this PR)
  • Make sure all of the significant new logic is covered by tests
  • Rebase your changes on master so that they can be merged easily
  • Make sure all tests and linter rules pass

*Make sure changelog entries note which project(s) has been affected. See older entries for examples on what this looks like.

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.

2 participants