If the Ruby on Rails grammar depends on HTML, but it isn't loaded, its
syntax highlighting won't include HTMl tokens. If we later load HTML,
we should update any buffer with the Rails grammar to reflect the
change. This commit changes grammars to memoize their initial rule and
repository. If an included grammar is added or removed, we clear the
memoized rules and emit a 'grammar-updated' event. Any tokenized
buffer that points to this grammar can then retokenize to reflect the
newly available/unavailable included grammar.
This spec was previously in the TokenizeBuffer spec which
required having a PHP fixture and setting up an edit session
to verify a line could be tokenized which was unnecessary.
Previously only the capture's name was considered when processing
tokens for capture indices.
Now the capture's patterns are matched against the captured region
if they exist.
Build scope selectors and patterns when setting up the grammar
for all entries under the grammar's injection object.
Include the injection patterns in the scanner when the injection's
scope selector matches the current rule stack.
Moving an item that extended the jQuery object between panes
was previously wiping out all jQuery data since remove() was being
called on the view item instead of detach().
This corrects a regression where closing an edit session that
is opened somewhere else should not prompt to save since it
won't be lost if closed immediately since it is still open in
another pane.
The redrawOnReattach flag will now be set when update
display is called on an invisible editor so that if the
editor is detached or hidden before the next update was
processed it will be performed when reattached.
The binding uses the `!important` selector to ensure that the editor
always gets a chance to clear multiple selections before other bindings
for escape are processed.