Commit 5dd74bc9 authored by yann300's avatar yann300

fix fileExternakkyChanged handler

parent 25dc9104
......@@ -64,8 +64,8 @@ function fileExplorer (appAPI, files) {
return yo`<div>This file has been changed outside of Remix IDE.</div>`
}
this.files.event.register('fileExternallyChanged', (path, content) => {
if (appAPI.currentFile() === path && appAPI.currentContent() !== content) {
this.files.event.register('fileExternallyChanged', (path, file) => {
if (appAPI.config.get('currentFile') === path && appAPI.currentContent() !== file.content) {
modalDialog(path + ' changed', remixdDialog(),
{
label: 'Keep the content displayed in Remix',
......@@ -74,7 +74,7 @@ function fileExplorer (appAPI, files) {
{
label: 'Replace by the new content',
fn: () => {
appAPI.setText(content)
appAPI.setText(file.content)
}
}
)
......@@ -292,9 +292,6 @@ function fileExplorer (appAPI, files) {
}
}
function fileFocus (path) {
var filepath = appAPI.config.get('currentFile')
if (filepath === path) return
......
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