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.
Previously an inserted automcomplete match would not
update the case of the prefix or suffix of the match
and instead only insert the text from the matched word
between the prefix and suffix.
Now the entire matched word is inserted as-is replacing
the existing prefix and suffix.
Previously the wrap guide would cause the
editor to scroll if the editor was narrower
than the wrap guide column without taking into
account whether any lines actually reach the guide.
Now the wrap guide only displays when either the wrap
guide column is less than the minimum width of the
editor layer or if the wrap guide column is less than
the entire width of the editor.
This corrects a regression when pattern matching
to the newline was added.
If the newline is never matched the loop still needs to
terminated so now when the position is before the newline
and the last match had no tokens the loop is broken out of.
The `load` method on the superclass will provide a general template for
loading the package's resource. Each subclass will be responsible for
loading resources in a manner appropriate for the package type. There's
some initial progress on loading TextMate settings as scoped properties,
translating the TextMate scope selectors to CSS-style atom selectors.
This makes the scoped property system mimic the behavior of CSS. When
there is a tie, the scoped properties loaded later in the cascade win.
I also optimize the scanning of all the properties, checking only those
sets of properties that have a value for the desired key path, to reduce
the need to match a ton of scope selectors.
We'll store all syntax-related global state in the `syntax` global. For
now, this means that all scoped properties will be stored here, as well
as all grammars.
Previously no gutter highlight was displayed unless
the selection was empty.
Now there is a separate CSS class for no selection
that changes the background color independently
from the foreground color.
You can pass a scope stack when calling `config.get`, which will prefer
settings under the most specific matching scope selector for the given
scope stack.
This simplifies the loading of TextMate bundles in the spec and benchmark helpers. Since `loadBundle` was already implemented on `atom`, it made sense to move this logic here. Config is now more focused on its core job of handling configuration, not loading bundles.
Previously a non-Inconsolata character
was being used which caused alignment issues
with selections and the cursor
Also switch values in editor.coffee to use codes
so they can be viewed in any font.