From b6db4698a814fc41ef7e630072ba358e5e65c66f Mon Sep 17 00:00:00 2001 From: nightwing Date: Thu, 9 Jul 2015 10:31:25 +0400 Subject: [PATCH] fix inconsistent event sequence when deleting a file from the tree --- plugins/c9.ide.editors/tabmanager.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/c9.ide.editors/tabmanager.js b/plugins/c9.ide.editors/tabmanager.js index ade10e4b..1db406f2 100644 --- a/plugins/c9.ide.editors/tabmanager.js +++ b/plugins/c9.ide.editors/tabmanager.js @@ -131,7 +131,11 @@ define(function(require, module, exports) { function removeTab(e) { if (!e.error) { var tab = findTab(e.path); - tab && tab.unload(); + if (tab) { + tab.document.meta.$ignoreSave = true; + tab.close(); + delete tab.document.meta.$ignoreSave; + } } } fs.on("afterUnlink", removeTab);