From 4e5c7f30fa691fcd6d56c36bef09e8f0cc995e16 Mon Sep 17 00:00:00 2001 From: mcmlxxix <> Date: Fri, 1 Mar 2013 18:05:05 +0000 Subject: [PATCH] insert empty array at specified location instead of initializing characters to frame width --- exec/load/frame.js | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/exec/load/frame.js b/exec/load/frame.js index 67364e0c64..15cd7aceba 100644 --- a/exec/load/frame.js +++ b/exec/load/frame.js @@ -775,18 +775,12 @@ function Frame(x,y,width,height,attr,parent) { this.refresh(); } this.insertLine = function(y) { - var l = undefined; - if(properties.data[y]) { - var l = new Array(this.width); - properties.data.splice(y,0,l); - for(var x=0;x<this.width;x++) { - properties.data[y][x] = new Char(); - } - this.refresh(); - } else { + if(properties.data[y]) + properties.data.splice(y,0,[]); + else properties.data[y] = []; - } - return l; + this.refresh(); + return properties.data[y]; } this.deleteLine = function(y) { var l = undefined; -- GitLab