This prevents the command palette spec from failing because it’s
explicitly asserting that no listener registered on the window without
a description should show up in the palette, but core:close is also
registered on the workspace.
Previously the WorkspaceView::setTitle was mocked in specs to prevent
the title from changing. But I would like to move the title update logic
without breaking assertions, so now we can assert directly on
document.title.
Commands registered with the command registry will always be handled
first, so as long as we disable any listeners in the registry that were
already invoked for the current command, we don’t need to disable jQuery
methods before replaying the command after activating the package.
This commit adds the ability to call .disableInvokedListeners on the
event passed to the command listeners. This returns a function which
can be called to reenable them.
Previously, stopping propagation would work on the synthetic bubbling
phase of the command registry itself, but the original event would
continue to propagate which is counterintuitive.
* Activation events can be handled via atom.commands
* Pre-existing listeners registered via atom.commands are disabled when
replaying events for the activated package.
This commit adds the ability to get and restore snapshots of command
listeners. Whatever commands are installed before specs begin are
preserved, but commands added during specs are always cleared away.
If present, it will be called with the model object instead of
instantiating the view constructor directly and assigning a model on it.
This gives users more flexibility when constructing views.
It’s a more technically correct term. You use a class keyword to declare
these things, but the actual objects you pass around to talk about them
are constructor functions.
It returns the root DOM node of the workspace. Eventually this will
be a custom element but for now it’s just a DOM node with a
__spacePenView reference on it.
Previously when the delta between the suggested and current indent level
was greater than zero but less than one, no text would be inserted since
Editor::buildIndentString returns an empty string for levels less than one
when using hard tabs.
Closes#3575