This is part of an effort to disentangle LanguageMode, DisplayBuffer,
and TokenizedBuffer. It should be easy to create a DisplayBuffer
without creating an EditSession… let's get the dependencies flowing
in a single direction.
Previously namespaces were used to off() when a buffer was
unsubscribed from which affected other views in the same
package also listening to the current buffer.
Now event namespaces are no longer used and instead off() is
called with the callbacks originally registered for the given
event name.
viewForActiveItem() can create a view which we don't want to do
when responding to events in the status bar. Instead we just want
to access the already existing view for the active item.
The status bar view now tracks the active pane item
and hides and shows elements that apply for the active
item such as path, cursor position, grammar, etc.
Previously, package specs needed to deactivate the root view to test
their package serialization. Now, specs can just deactivate and then
reactivate the package, relying on serialization infrastructure that's
independent of the lifecycle of the RootView.
Previously it would return the closest '.pane' element
which would cause an editor inside of another editor
to report having a pane such as in the autocomplete view.
This event now fires whenever the content of the buffer changes (after
a rate-limiting delay) with a single boolean indicating the modified
status of the buffer. There's now a separate event called
'modified-status-changed' to indicate events that change the boolean
value of the isModified method, so we don't need to fire
'contents-modified' when the underlying file is deleted for instance.
Now the status bar and tree view both listen for
status change events and use the cached information
available from the git object to update their views.
Removes need to check if the repository is valid before
each native API call and also removes calling into the
native-side if no repository can be opened for the project
page.
Previously the status was fetched twice, once for
if modified and once for if new.
Now the flags are fetched once and Git now provides
helpers to check the status flags directly for
modified and new status.
This removes the need to open a new repository
each time a directory-view or file-view is displayed
and also when a status-bar is displayed for a buffer.
Any events emitted from DOM nodes should be prefixed with an identifier
for the node that emits them. This eliminates the possibility of ambiguity
when the events bubble up the DOM away from their emitter.