This repository has been archived by the owner on Oct 17, 2018. It is now read-only.
Update package in preparation for native text buffer #45
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.
As part of the performance work in atom/atom#14435, we have decided to drop support for treating lone
\r
characters as line endings. Handling these would have become a bit more complicated with our new text buffer representation, and given how rarely this feature is used, we didn't think it was worth it.It's possible we'll re-add support for them in the future if people care enough about it that it becomes more important than all of the other performance improvements that we're trying to get done.
In addition, this PR optimizes the detection of which line endings are in use in a given file by taking advantage of the TextBuffer's new async regex search feature. Because we support mixed line endings, detecting a file's line endings requires scanning the entire file. Previously, for a 2MB file, this could take upwards of 50ms. Now it's essentially instantaneous.