From 31bbbe098abaaddf12aade56b86e1e4c8ceaf1e8 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Sat, 29 Jun 2013 15:00:37 +0100 Subject: [PATCH] Remove line class on CM instance not selected tab We were trying to remove a line class based on tab number and not CM instance, this ended up causing an error after 2nd open. Because of the error, CM instance numbers were not being set correctly, so we ended up with the same number and so when switching tabs it would show the same editor instance. --- lib/file-control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/file-control.php b/lib/file-control.php index c9b7bef..1d4b509 100644 --- a/lib/file-control.php +++ b/lib/file-control.php @@ -362,7 +362,7 @@ if (action=="load") { // Then clean it up, set the text cursor, update the display and get the character data top.ICEcoder.contentCleanUp(); - top.ICEcoder.content.contentWindow['cM'+top.ICEcoder.cMInstances[top.ICEcoder.selectedTab-1]].removeLineClass(top.ICEcoder['cMActiveLine'+top.ICEcoder.selectedTab], "background"); + top.ICEcoder.content.contentWindow['cM'+top.ICEcoder.cMInstances[top.ICEcoder.selectedTab-1]].removeLineClass(top.ICEcoder['cMActiveLine'+top.ICEcoder.cMInstances[top.ICEcoder.selectedTab-1]], "background"); top.ICEcoder['cMActiveLine'+top.ICEcoder.selectedTab] = top.ICEcoder.content.contentWindow['cM'+top.ICEcoder.cMInstances[top.ICEcoder.selectedTab-1]].addLineClass(0, "background", "cm-s-activeLine"); top.ICEcoder.nextcMInstance++; top.ICEcoder.openFileMDTs.push('');