From 1fab47d6406c6af180d5e94c5dfef3a6ed98843f Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 28 Jun 2018 14:23:46 +0200 Subject: [PATCH] move open file at then end --- src/app.js | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/app.js b/src/app.js index 3051c57e60..3d84f0e183 100644 --- a/src/app.js +++ b/src/app.js @@ -552,19 +552,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org filePanel.event.register('resize', delta => self._adjustLayout('left', delta)) - var previouslyOpenedFile = self._components.config.get('currentFile') - if (previouslyOpenedFile) { - self._components.filesProviders['browser'].get(previouslyOpenedFile, (error, content) => { - if (!error && content) { - fileManager.switchFile(previouslyOpenedFile) - } else { - fileManager.switchFile() - } - }) - } else { - fileManager.switchFile() - } - // ----------------- Renderer ----------------- var renderer = new Renderer() registry.put({api: renderer, name: 'renderer'}) @@ -673,4 +660,18 @@ Please make a backup of your contracts and start using http://remix.ethereum.org self.startdebugging(queryParams.get().debugtx) } }) + + // Open last opened file + var previouslyOpenedFile = self._components.config.get('currentFile') + if (previouslyOpenedFile) { + self._components.filesProviders['browser'].get(previouslyOpenedFile, (error, content) => { + if (!error && content) { + fileManager.switchFile(previouslyOpenedFile) + } else { + fileManager.switchFile() + } + }) + } else { + fileManager.switchFile() + } }