This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Use onDidChange rather than onDidChangeText #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TextBuffer::onDidChangeTextdoesn't include the old text at the moment, making it very difficult to compute the length of the previous change. The only downside is that we can't batch changes in a single transaction together.However, during most normal user edits I would imagine that transactions are fairly small, so I think it's OK if we use plain-old
TextBuffer::onDidChangefor now. We use this in Nuclide's language services without issue, at least.