Using this new `abort` mechanism ensures that autocomplete's changes can never be redone, while eliminating the need to track operation counts explicitly.
When `UndoManager.transact` is called with no function, you later need
to `abort` or `commit` the transaction manually. This allows
transactions to last longer than the dynamic scope of the single
function passed to `transact`.
Also, add a spec to cover the loading of keymaps in `atom-spec` and
reset the `keymap`'s internal data after each spec gets run to prevent
test pollution with keymaps.
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.
This prevents autosave from writing unmodified buffers to disk, which
was causing the tree view to rebuild directory contents based on the
write event just when switching tabs.
We no longer subscribe to `RootView` so we don't need to unsubscribe.
We can use `@subscribe` to subscribe to window, so we don't need to
genette a unique id for the editor in order to unsubscribe, because the
editor will unsubscribe automatically when removed now.
TextMatePackage is only designed to load resources out of a TextMate
bundle. It's used only at load time, and from that point out we only
refer to our own global `syntax` data structure to access the data that
it loads.
These changes are mostly aesthetic in nature. I just thought it would
be a good idea to have theme loading be parallel to package loading as
much as possible. So I localized more logic on the `atom` global.
We'll look first in the user themes directory, then in the built-in
themes directory. This allows us to default to 'IR_Black' and not crash
if the user doesn't setup their `~/.atom/themes` directory.
There's a slight wrinkle in this commit… TextMate grammars sometimes store
the `foldStopMarker` directly in the grammar, rather than storing it
in a separate scoped preferences file like the other settings. So we
have to scan through grammars looking for those that have the fold end
marker and make a scoped property for that grammar's scope.
Previously, we had a custom method on the `TextMateBundle` class for
retrieving these variables from the bundle. Now we're using Atom's
`syntax.getProperty` mechanism. The idea is to map TextMate concepts
to their Atom equivalent, rather than building everything directly
around TextMate.
This problem was when the focus element is detached
when navigating away from the window and when
the window is then given focus again nothing has
focus.
The solution is to use RootView's focus handler
on the window to bring focus to the editor or
other view when the document's active element
is the body meaning nothing inside the RootView
currently has focus.