Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

Commit

Permalink
Remove fold header commentaries function
Browse files Browse the repository at this point in the history
Signed-off-by: Bruno Bottazzini <bruno.bottazzini@intel.com>
  • Loading branch information
Bruno Bottazzini committed Mar 17, 2016
1 parent 33cf237 commit 4061111
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions client/js/controllers/editor.js
Expand Up @@ -96,7 +96,6 @@
$scope.fbpType = true;
aceConfig.set("modePath", "js/ace/");
editor.getSession().setMode("ace/mode/fbp");
foldHeaderCommentaries();
showSchema();
} else {
$scope.schemaOn = false;
Expand Down Expand Up @@ -130,26 +129,6 @@
}
};

//Function that will folder header of a ace contents
function foldHeaderCommentaries() {
var lines = editor.session.getLines(0, editor.session.getLength());
var count = 0;
var l;
var ahead;
for (var i = 0; i < editor.session.getLength(); i++) {
l = editor.session.getLine(i);
if (l.charAt(0) !== "#") {
break;
} else {
count++;
}
}
var len = editor.session.getLine(count).length;
editor.session.selection.addRange(new Range(0, 0, count, len));
editor.session.toggleFold(false);
editor.session.selection.clearSelection();
}

function showSchema() {
if ($scope.folder === "demo") {
var name = $scope.fileName.split(".fbp")[0].split(" ")[1];
Expand Down

0 comments on commit 4061111

Please sign in to comment.