Merge pull request #286 from ilvalle/fix-editor

fix for empty python file in admin editor
This commit is contained in:
mdipierro
2013-10-29 14:05:21 -07:00
2 changed files with 13 additions and 21 deletions
@@ -1,8 +1,9 @@
CodeMirror.registerHelper("fold", "indent", function(cm, start) {
var lastLine = cm.lastLine(),
tabSize = cm.getOption("tabSize"),
firstLine = cm.getLine(start.line),
myIndent = CodeMirror.countColumn(firstLine, null, tabSize);
firstLine = cm.getLine(start.line);
if (!tabSize || !firstLine) return;
var myIndent = CodeMirror.countColumn(firstLine, null, tabSize);
function foldEnded(curColumn, prevColumn) {
return curColumn < myIndent ||