Commit 6c16ba71 authored by chriseth's avatar chriseth

Fixes from review.

parent c90c0631
...@@ -209,11 +209,11 @@ var run = function () { ...@@ -209,11 +209,11 @@ var run = function () {
}) })
}) })
files.event.register('fileRemoved', function (path) { files.event.register('fileRemoved', function (path) {
editor.discard(path)
if (path === ui.get('currentFile')) { if (path === ui.get('currentFile')) {
ui.set('currentFile', '') ui.set('currentFile', '')
switchToNextFile() switchToNextFile()
} }
editor.discard(path)
refreshTabs() refreshTabs()
}) })
files.event.register('fileAdded', function (path) { files.event.register('fileAdded', function (path) {
......
...@@ -77,8 +77,8 @@ function fileExplorer (appAPI, files) { ...@@ -77,8 +77,8 @@ function fileExplorer (appAPI, files) {
` `
appUI.register('fileChanged', (changedFiles) => { appUI.register('fileChanged', (changedFiles) => {
if (changedFiles[0] == 'currentFile') { if (changedFiles[0] === 'currentFile') {
fileFocus(files.get('currentfile')) fileFocus(files.get('currentFile'))
} }
}) })
fileEvents.register('fileRemoved', fileRemoved) 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