fix for empty file in admin editor
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
CodeMirror.registerHelper("fold", "indent", function(cm, start) {
|
CodeMirror.registerHelper("fold", "indent", function(cm, start) {
|
||||||
var lastLine = cm.lastLine(),
|
var lastLine = cm.lastLine(),
|
||||||
tabSize = cm.getOption("tabSize"),
|
tabSize = cm.getOption("tabSize"),
|
||||||
firstLine = cm.getLine(start.line),
|
firstLine = cm.getLine(start.line);
|
||||||
myIndent = CodeMirror.countColumn(firstLine, null, tabSize);
|
if (!tabSize || !firstLine) return;
|
||||||
|
var myIndent = CodeMirror.countColumn(firstLine, null, tabSize);
|
||||||
|
|
||||||
function foldEnded(curColumn, prevColumn) {
|
function foldEnded(curColumn, prevColumn) {
|
||||||
return curColumn < myIndent ||
|
return curColumn < myIndent ||
|
||||||
|
|||||||
Reference in New Issue
Block a user