From d91cc0ee8d05521eb9241fada4c2b0292e1de184 Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 17 Mar 2022 16:06:38 +0100 Subject: [PATCH] make sure we remove the current file from the previous session --- apps/remix-ide/src/app/files/fileManager.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/remix-ide/src/app/files/fileManager.ts b/apps/remix-ide/src/app/files/fileManager.ts index da8f97c8b0..431dc8693e 100644 --- a/apps/remix-ide/src/app/files/fileManager.ts +++ b/apps/remix-ide/src/app/files/fileManager.ts @@ -410,6 +410,9 @@ class FileManager extends Plugin { workspaceExplorer: this._components.registry.get('fileproviders/workspace').api, filesProviders: this._components.registry.get('fileproviders').api } + + this._deps.config.set('currentFile', '') // make sure we remove the current file from the previous session + this._deps.browserExplorer.event.on('fileChanged', (path) => { this.fileChangedEvent(path) }) this._deps.browserExplorer.event.on('fileRenamed', (oldName, newName, isFolder) => { this.fileRenamedEvent(oldName, newName, isFolder) }) this._deps.localhostExplorer.event.on('fileRenamed', (oldName, newName, isFolder) => { this.fileRenamedEvent(oldName, newName, isFolder) })