Only focus when toggling the tree view or revealing
an active file.
This prevents the tree view from stealing focus when it
is attached during deserialization.
Previously the user init script path was required before the
packages and user keymaps were loaded which could override
config and keymap settings set by the user init script path.
Not all bundles specify this and an error will be
raised when trying to fold inside a grammar that does
not have this property defined if this check isn't done.
Previously this was done during `rake install`.
Also default to `~/github/atom` as the default resource path
when no `--resource-path` argument is specified. This argument
will now be required when running in dev mode if the repository
is not at the default location.
Closes#300
This saves the state of the rendered lines, the display buffer, the
tokenized buffer, and the buffer to a file. If a problem arises with
rendering, hopefully we can use it to diagnose in which layer things
went awry.
Previously if the token has both leading and
trailing whitespace the classes would bleed
across the cases and cause an exception to be
thrown.
Closes#298
Previously document.caretFromRange() was used which
required hiding and showing the overlayer which would
cause a relayout and entire repaint of the editor area.
Now the text nodes on the selected row are iterated over
until the column corresponding to the event's pageX value
is found.
Closes#290
The whitespace in lines that have no non-whitespace
text is treated as trailing whitespace so add the
indent guide to the trailing whitespace tokens when the
line is 100% whitespace.
Certain bundles require multi-line matches in the firstLineMatch
value so count the number of newlines in the regex and only test
the regex against only those lines.
Previously the 'editor:attached' was used which would not
fire for editors already attached and so any editors
opened before the snippets package was loaded would not
have snippets enabled.
Keeping the shutdown state as a local var in window.coffee causes spec failures because window.shutdown can only be called once in the entire spec suite
If either fails to deserialize from the persisted state
then fall back to the default constructors.
This ensures Atom will still start even if the serialization
format changes and the previous stored state can no longer
be successfully deserialized.
Mouse events that occur in the gutter are forwarded to the
rendered lines with the y-coordinate translated to be the
leftmost pixel of the editor to simulate the event originating
from column 0 of the current line row.
Closes#287