This branch uses EventKit, an ultra-simple library for implementing
events. The object implementing the methods maintains its own emitter
object rather than doing a mixin like Emissary encourages. This will
make it easier for us to deprecate ::on on the object itself. Unlike
emissary, the EventKit Emitter implements a super minimalistic API that
only allows one value to be emitted and always returns a Disposable
from subscriptions.
Previously disabling a theme wouldn't wait for the full reload
to finish since and the spec would intermittently fail because
the promise was fulfilled after the spec completed and the
subscription was leaked.
The problem here is that the lines in the editor no longer reflect the
lines on screen, but we're looking for line nodes corresponding to the
editor's current contents.
This caused problems in the case of find-and-replace:select-all with
multiple editors into the same file.
* a marker is created on the TextBuffer capturing the selection
* DisplayBuffer:create-marker is fired from the first DisplayBuffer.
The marker is turned into a selection which is merged into the current
selection, deleting the marker that was created.
* DisplayBuffer::handleBufferMarkerCreated is called on the second
DisplayBuffer. The marker has been destroyed at this point, so it emits
DisplayBuffer:create-marker with undefined.
* ERROR>
Closes#3364
* Simplify scrollbar refresh and measurement by using imperative DOM
manipulation instead of React to hide/show scrollbars.
* Rename `::performInitialMeasurement` to `::becameVisible`
* Break `::checkForVisibilityChange` out of `::pollDOM` and use it in
to check for the element becoming visible in `componentWillUpdate`.
* Don't rely on stored visibility state anywhere. Always check again.
This could potentially be cached for an update cycle but being wrong
about this is disastrous so I'm being conservative.
This moves observation of the config keys to Editor, which assigns the
invisibles hash or null on the TokenizedBuffer via the DisplayBuffer to
control whether we render invisibles or not.
This commit also extends config.get to merge default values into the
returned object if both the assigned and default values are objects.
This allows 'atom.invisibles' to be treated as an object that always has
the default values filled in.