diff --git a/butterfly/static/coffees/term.coffee b/butterfly/static/coffees/term.coffee index 467cfea..f48db57 100644 --- a/butterfly/static/coffees/term.coffee +++ b/butterfly/static/coffees/term.coffee @@ -1408,10 +1408,10 @@ class Terminal if j < @rows el = @element while j++ < @rows - @lines.push @blankLine() if @lines.length < y + @ybase + @lines.push @blankLine() if @lines.length < @rows + @ybase if @children.length < @rows line = @document.createElement("div") - @line.className = 'line' + line.className = 'line' line.style.height = @char_size.height + 'px' el.appendChild line @children.push line diff --git a/butterfly/static/javascripts/main.js b/butterfly/static/javascripts/main.js index 7511f26..f4532a7 100644 --- a/butterfly/static/javascripts/main.js +++ b/butterfly/static/javascripts/main.js @@ -1334,12 +1334,12 @@ Terminal = (function() { if (j < this.rows) { el = this.element; while (j++ < this.rows) { - if (this.lines.length < y + this.ybase) { + if (this.lines.length < this.rows + this.ybase) { this.lines.push(this.blankLine()); } if (this.children.length < this.rows) { line = this.document.createElement("div"); - this.line.className = 'line'; + line.className = 'line'; line.style.height = this.char_size.height + 'px'; el.appendChild(line); this.children.push(line);