You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Calculate newEnd correctly when line ending normalization takes place
As part of #255, we changed the
way the `onDidChangeText` and `onDidStopChanging` collected changes so
that they could avoid relying on the history (see 8a4a4d8 for more
background).
Later, in ce1964f, we improved the performance of combining the
accumulated changes by also storing the change's `newEnd`. This was,
however, slightly incorrect, as we calculated such coordinate before
normalizing line endings, thus causing the various text change events to
report inaccurate information.
With this commit we are fixing that oversight (adding also test coverage
to ensure we don't regress in the future), as well as streamlining
`applyChange`. In particular, we will now take care of normalizing lines
in `setTextInRange` instead of `applyChange`, as that's the only call
site in which normalization needs to take place.
0 commit comments