From c8b194931f27278c7c95bafcdcd9e01d48582617 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sun, 25 Sep 2016 01:56:03 -0700 Subject: [PATCH 1/2] Sync scroll bar after reset Fixes #278 --- src/xterm.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/xterm.js b/src/xterm.js index bc0de043..021cbfdf 100644 --- a/src/xterm.js +++ b/src/xterm.js @@ -3207,6 +3207,7 @@ Terminal.prototype.reset = function() { Terminal.call(this, this.options); this.customKeydownHandler = customKeydownHandler; this.refresh(0, this.rows - 1); + this.viewport.syncScrollArea(); }; From 71e20801f0f13fd14825b8c0c4eff3b412973b0f Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sun, 25 Sep 2016 02:07:53 -0700 Subject: [PATCH 2/2] Fix tests --- test/test.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/test.js b/test/test.js index dac0535b..a015b455 100644 --- a/test/test.js +++ b/test/test.js @@ -8,6 +8,9 @@ describe('xterm.js', function() { beforeEach(function () { xterm = new Terminal(); xterm.refresh = function(){}; + xterm.viewport = { + syncScrollArea: function(){} + }; }); describe('getOption', function() {