The problem I've been struggling with is that we need to potentially
assign tabs both to EditSessions and also to other views added by
extensions, like a markdown preview view. EditSessions are however not
actually views… instead they plug into editors. The solution is to
have the pane ask a model object what view should be used to render
it. When asked to show a non-view item, the pane constructs and
appends a view for that item or recycles an appropriate view that it
has already appended.
Since this is the more external method, having a shorter name
is more convenient. The former `buildEditSession` method took a
Buffer, and is now called `buildEditSessionForBuffer`.
There still appear to be crashes occurring when
using libgit2 from multiple workers at the same time.
So only start a new status worker once the current one
completes if a refresh was requested while a worker was
running.
Closes#367
This keeps the status-changed event from triggering
the first time the status is requested as it goes
from undefined to 0 which should be treated as no
change.
Now the status bar and tree view both listen for
status change events and use the cached information
available from the git object to update their views.
By default this will occur when the window gains
focus and the Git class can now be subscribed to
so listeners can become notified when the status
of a repository changes.
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.
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.