From 1774dba7ed93b3112602bbd5d1120291d9788281 Mon Sep 17 00:00:00 2001 From: nuintun Date: Tue, 24 Nov 2015 19:41:29 +0800 Subject: [PATCH] update files --- static/css/index.css | 1 + static/js/components/app-main/index.js | 10 ++++++++-- static/js/terminal/index.js | 3 ++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/static/css/index.css b/static/css/index.css index 3b71e70..ffd2c40 100644 --- a/static/css/index.css +++ b/static/css/index.css @@ -424,6 +424,7 @@ header [class*=" icon-"] { background-color: #181818; border-left: 1px dashed #ccc; font-family: Consolas, sans-serif; + overflow: auto; } .ui-control-bar .ui-button-orange { margin: 0 10px 0 0; diff --git a/static/js/components/app-main/index.js b/static/js/components/app-main/index.js index f26d3e5..b8e757e 100644 --- a/static/js/components/app-main/index.js +++ b/static/js/components/app-main/index.js @@ -127,7 +127,10 @@ module.exports = Vue.component('app-main', { console.log(xterm); - test.forEach(function (line){ xterm.writeln(line); }); + test.forEach(function (line){ + xterm.writeln(line); + xterm.cursorNextLine([0]); + }); window.AppRuntime[this.project.name] = { name: name, @@ -135,7 +138,10 @@ module.exports = Vue.component('app-main', { xterm: xterm } } else { - test.forEach(function (line){ runtime.xterm.writeln(line); }); + test.forEach(function (line){ + runtime.xterm.writeln(line); + runtime.xterm.cursorNextLine([0]); + }); } }, setting: function (){ diff --git a/static/js/terminal/index.js b/static/js/terminal/index.js index f9431bb..a0a255c 100644 --- a/static/js/terminal/index.js +++ b/static/js/terminal/index.js @@ -6,7 +6,7 @@ module.exports = Terminal; function Terminal(opts){ opts = opts || {}; - + if (!(this instanceof Terminal)) return new Terminal(opts); this.cols = opts.cols || 500; @@ -77,6 +77,7 @@ require('./lib/options')(Terminal); require('./lib/open')(Terminal); require('./lib/destroy')(Terminal); require('./lib/refresh')(Terminal); +require('./lib/scrollDisp')(Terminal); require('./lib/write')(Terminal);