Skip to content

Commit df685b3

Browse files
committed
updateDiffOnSave available in JS
Used in if statement to determine if we should do this or not
1 parent 2b44096 commit df685b3

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

index.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
echo "top.ICEcoder.theme = '".($ICEcoder["theme"]=="default" ? 'icecoder' : $ICEcoder["theme"])."';".
9090
"top.ICEcoder.fontSize = '".$ICEcoder["fontSize"]."';".
9191
"top.ICEcoder.openLastFiles = ".($ICEcoder["openLastFiles"] ? 'true' : 'false').";".
92+
"top.ICEcoder.updateDiffOnSave = ".($ICEcoder["updateDiffOnSave"] ? 'true' : 'false').";".
9293
"top.ICEcoder.codeAssist = ".($ICEcoder["codeAssist"] ? 'true' : 'false').";".
9394
"top.ICEcoder.lineWrapping = ".($ICEcoder["lineWrapping"] ? 'true' : 'false').";".
9495
"top.ICEcoder.indentWithTabs = ".($ICEcoder["indentWithTabs"] ? 'true' : 'false').";".

lib/file-control-xhr.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,19 @@
195195
196196
};';
197197

198+
// Copy over content to diff pane if we have that setting on
199+
$doNext .= '
200+
cM = top.ICEcoder.getcMInstance();
201+
cMdiff = top.ICEcoder.getcMdiffInstance();
202+
if (top.ICEcoder.updateDiffOnSave) {
203+
cMdiff.setValue(cM.getValue());
204+
};
205+
';
198206

199207
// Finally, set previous files, indicate changes, set saved points and redo tabs
200208
$doNext .= '
201209
top.ICEcoder.setPreviousFiles();
202210
setTimeout(function(){top.ICEcoder.indicateChanges()},4);
203-
cM = top.ICEcoder.getcMInstance();
204211
top.ICEcoder.savedPoints[top.ICEcoder.selectedTab-1] = cM.changeGeneration();
205212
top.ICEcoder.redoTabHighlight(top.ICEcoder.selectedTab);';
206213

0 commit comments

Comments
 (0)