From 527312a61be0102c0d6afc4860a8174e28e01ae4 Mon Sep 17 00:00:00 2001 From: nuintun Date: Mon, 30 Nov 2015 16:42:58 +0800 Subject: [PATCH] update files --- canvas.html | 2 ++ static/js/terminal/xterm.js | 13 +++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/canvas.html b/canvas.html index 6a369ad..cad6c87 100644 --- a/canvas.html +++ b/canvas.html @@ -61,6 +61,8 @@ var xterm = new AnsiTerminal(80, 60, 100); + xterm.debug = false; + [ '', '\u001b[92m\'use strict\'\u001b[39m\u001b[90m;\u001b[39m', diff --git a/static/js/terminal/xterm.js b/static/js/terminal/xterm.js index f756fc5..efd3389 100644 --- a/static/js/terminal/xterm.js +++ b/static/js/terminal/xterm.js @@ -750,11 +750,16 @@ TChar.prototype.toString = function (){ }; var _uniqueId = 0; -var Row = function (){ + +/** + * Row + * @constructor + */ +function Row(){ this.uniqueId = _uniqueId++ | 0; this.version = 1; this.cells = []; -}; +} /** * ScreenBuffer - represents a terminal screen with cols and rows. @@ -766,7 +771,7 @@ var Row = function (){ * @param scrollLength * @constructor */ -var ScreenBuffer = function (cols, rows, scrollLength){ +function ScreenBuffer(cols, rows, scrollLength){ this.rows = rows; this.cols = cols; this.scrollLength = scrollLength | 0; @@ -776,7 +781,7 @@ var ScreenBuffer = function (cols, rows, scrollLength){ this.versions = {}; this.reset(); -}; +} ScreenBuffer.prototype.reset = function (){ this.buffer = [];