Immediately fetch new buffers' git status in GitRepository

We used to emit buffer added events before the buffers were loaded, so we
would end up fetching their git status soon afterwords, when they emitted
the did-reload event.
This commit is contained in:
Max Brunsfeld
2017-05-22 17:50:37 -07:00
parent d7d206d485
commit d296e9d185

View File

@@ -437,6 +437,7 @@ class GitRepository
if bufferPath = buffer.getPath()
@getPathStatus(bufferPath)
getBufferPathStatus()
bufferSubscriptions = new CompositeDisposable
bufferSubscriptions.add buffer.onDidSave(getBufferPathStatus)
bufferSubscriptions.add buffer.onDidReload(getBufferPathStatus)