From 1039c0109f68a1562d6b9b93ba5552109d7b4000 Mon Sep 17 00:00:00 2001 From: nuintun Date: Wed, 25 Nov 2015 11:32:38 +0800 Subject: [PATCH] update files --- static/js/terminal/index.js | 3 ++- static/js/terminal/lib/esc/reset.js | 8 +++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/static/js/terminal/index.js b/static/js/terminal/index.js index 8e8e52f..d038f0e 100644 --- a/static/js/terminal/index.js +++ b/static/js/terminal/index.js @@ -26,6 +26,7 @@ function Terminal(options){ this[key] = options[key]; } else { this[key] = value; + options[key] = value; } }, this); @@ -52,7 +53,7 @@ function Terminal(options){ this.bgColor = options.bgColor || Terminal.defaultColors.bgColor; this.fgColor = options.bgColor || Terminal.defaultColors.fgColor; - this.options = options; + this.resetOptions = options; this.ybase = 0; this.ydisp = 0; diff --git a/static/js/terminal/lib/esc/reset.js b/static/js/terminal/lib/esc/reset.js index acac0f2..e151c43 100644 --- a/static/js/terminal/lib/esc/reset.js +++ b/static/js/terminal/lib/esc/reset.js @@ -7,12 +7,10 @@ module.exports = function (Terminal){ // ESC c Full Reset (RIS). Terminal.prototype.reset = function (){ - console.log(this.options); + this.resetOptions.rows = this.rows; + this.resetOptions.cols = this.cols; - this.options.rows = this.rows; - this.options.cols = this.cols; - - Terminal.call(this, this.options); + Terminal.call(this, this.resetOptions); this.refresh(0, this.rows - 1); }; };