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

Only emit one display layer change event per buffer transaction #274

Merged
merged 9 commits into from Oct 31, 2017

Conversation

Projects
None yet
1 participant
@maxbrunsfeld
Contributor

maxbrunsfeld commented Oct 30, 2017

Similar to #270, #273

Previously, DisplayLayers would call their onDidChangeSync callbacks once each time their underlying TextBuffer changed. This was a source of slowness when typing with multiple cursors and prevented us from wanting to implement features like auto-indent in terms of a series of small buffer changes.

In this PR, I've renamed .onDidChangeSync to .onDidChange and changed it so that callbacks are only called one time per text buffer transaction. I have also changed the events that it emits so that instead of having start, oldExtent and newExtent properties, they have oldRange and newRange properties similar to TextBuffer.onDidChange events.

/cc @nathansobo

@maxbrunsfeld maxbrunsfeld merged commit c185463 into master Oct 31, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@maxbrunsfeld maxbrunsfeld deleted the mb-one-display-layer-event-per-tx branch Oct 31, 2017

This was referenced Oct 31, 2017

This was referenced Oct 31, 2017

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