From 81fc8495b20c8a222ad3aa90f359df176ca5d0d3 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Thu, 2 Aug 2012 07:40:58 +0100 Subject: [PATCH] openFiles array fixes renameTab now targets the right array position (tabNum-1) updateFileManager now adds a / in to the files path ref --- lib/coder.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/coder.js b/lib/coder.js index d833cd4..f9f2e43 100644 --- a/lib/coder.js +++ b/lib/coder.js @@ -444,11 +444,11 @@ var ICEcoder = { var closeTabLink; // Push new file into array - top.ICEcoder.openFiles[tabNum] = newName; + top.ICEcoder.openFiles[tabNum-1] = newName; // Setup a new tab closeTabLink = ''; - top.document.getElementById('tab'+tabNum).innerHTML = top.ICEcoder.openFiles[tabNum] + " " + closeTabLink; + top.document.getElementById('tab'+tabNum).innerHTML = top.ICEcoder.openFiles[tabNum-1] + " " + closeTabLink; }, // Indicate if the nesting structure of the code is OK @@ -744,7 +744,6 @@ var ICEcoder = { // No reason why we can't open a file (so far) canOpenFile = true; - // Limit to 10 files open at a time if (top.ICEcoder.openFiles.length<10) { // check if we've already got it in our array @@ -1205,7 +1204,7 @@ var ICEcoder = { } // If we added a new file, we've saved it under a new filename, so set that if (actionElemType=="file") { - top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]=location+"/"+file; + top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]=location+file; } }