Commit 6c16ba71 authored by chriseth's avatar chriseth

Fixes from review.

parent c90c0631
......@@ -209,11 +209,11 @@ var run = function () {
})
})
files.event.register('fileRemoved', function (path) {
editor.discard(path)
if (path === ui.get('currentFile')) {
ui.set('currentFile', '')
switchToNextFile()
}
editor.discard(path)
refreshTabs()
})
files.event.register('fileAdded', function (path) {
......
......@@ -77,8 +77,8 @@ function fileExplorer (appAPI, files) {
`
appUI.register('fileChanged', (changedFiles) => {
if (changedFiles[0] == 'currentFile') {
fileFocus(files.get('currentfile'))
if (changedFiles[0] === 'currentFile') {
fileFocus(files.get('currentFile'))
}
})
fileEvents.register('fileRemoved', fileRemoved)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment