This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 73
Only emit one display layer change event per buffer transaction #274
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
maxbrunsfeld
force-pushed
the
mb-one-display-layer-event-per-tx
branch
from
October 30, 2017 20:14
8a0593d
to
6f97438
Compare
This was referenced Oct 31, 2017
Changes to TextEditor.onDidChange and TextBuffer.onDidChange coming in Atom 1.23
nicktogo/coeditor#6
Open
Open
This was referenced Oct 31, 2017
Open
Changes to TextEditor.onDidChange and TextBuffer.onDidChange coming in Atom 1.23
tshort/atom-mdpad#2
Open
Changes to TextEditor.onDidChange and TextBuffer.onDidChange coming in Atom 1.23
pmb0/atom-perldoc#3
Open
Open
Changes to TextEditor.onDidChange and TextBuffer.onDidChange coming in Atom 1.23
t9md/atom-smalls#10
Closed
Changes to TextEditor.onDidChange and TextBuffer.onDidChange coming in Atom 1.23
abe33/atom-tablr#95
Open
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Similar to #270, #273
Previously,
DisplayLayers
would call theironDidChangeSync
callbacks once each time their underlyingTextBuffer
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 havingstart
,oldExtent
andnewExtent
properties, they haveoldRange
andnewRange
properties similar toTextBuffer.onDidChange
events./cc @nathansobo