New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call TextBuffer.onWillChange listeners only once per transaction #270

Merged
merged 7 commits into from Oct 25, 2017

Conversation

Projects
None yet
1 participant
@maxbrunsfeld
Contributor

maxbrunsfeld commented Oct 25, 2017

In order to make multi-cursor editing truly fast, we need to get rid of all event listeners that get called on each individual buffer change. This PR changes the semantics of TextBuffer.onWillChange so that its listeners get called only once per transaction, before any changes. There will no longer be any argument passed.

Since this is a breaking change, I'll need to open issues on the repositories of any Atom packages that use onWillChange. Luckily, I think there are only 3 or 4.

/cc @nathansobo

@maxbrunsfeld maxbrunsfeld merged commit 875a096 into master Oct 25, 2017

0 of 2 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

@maxbrunsfeld maxbrunsfeld deleted the mb-one-will-change-event-per-tx branch Oct 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment