do not store copy of breakpoints array in gutter

This commit is contained in:
nightwing 2012-05-19 20:38:09 +04:00
commit 31729a963a
4 changed files with 7 additions and 12 deletions

View file

@ -75,10 +75,6 @@ var Gutter = function(parentEl) {
this.$decorations[row] = (this.$decorations[row] || "").replace(" " + className, "");
};
this.setBreakpoints = function(rows) {
this.$breakpoints = rows.concat();
};
this.setAnnotations = function(annotations) {
// iterate over sparse array
this.$annotations = [];
@ -116,6 +112,7 @@ var Gutter = function(parentEl) {
var fold = this.session.getNextFoldLine(i);
var foldStart = fold ? fold.start.row : Infinity;
var foldWidgets = this.$showFoldWidgets && this.session.foldWidgets;
var breakpoints = this.session.$breakpoints;
while (true) {
if(i > foldStart) {
@ -129,7 +126,7 @@ var Gutter = function(parentEl) {
var annotation = this.$annotations[i] || emptyAnno;
html.push("<div class='ace_gutter-cell",
this.$decorations[i] || "",
this.$breakpoints[i] ? " ace_breakpoint " : " ",
breakpoints[i] ? " ace_breakpoint " : " ",
annotation.className,
"' title='", annotation.text.join("\n"),
"' style='height:", this.session.getRowLength(i) * config.lineHeight, "px;'>", (i+1));