From ca97cee4ddd23481f615df41a67fb8a43b479feb Mon Sep 17 00:00:00 2001 From: jpellizzari Date: Thu, 12 Jan 2017 11:58:58 -0800 Subject: [PATCH 1/3] Upgraded xterm.js to 2.2.3 --- client/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/package.json b/client/package.json index d94d02e3c..dff7cfaf1 100644 --- a/client/package.json +++ b/client/package.json @@ -42,7 +42,7 @@ "timely": "0.1.0", "whatwg-fetch": "2.0.1", "react-addons-perf": "15.4.1", - "xterm": "2.1.0" + "xterm": "2.2.3" }, "devDependencies": { "autoprefixer": "6.5.3", From 9e333d4f4d6a1b6fc8f504775fafa966fbb37021 Mon Sep 17 00:00:00 2001 From: Simon Howe Date: Wed, 1 Feb 2017 16:57:40 +0100 Subject: [PATCH 2/3] Remove scroll-lock, this is now a feature of xterm.js --- client/app/scripts/components/terminal.js | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/client/app/scripts/components/terminal.js b/client/app/scripts/components/terminal.js index 55b2219aa..89c3c285b 100644 --- a/client/app/scripts/components/terminal.js +++ b/client/app/scripts/components/terminal.js @@ -144,12 +144,7 @@ class Terminal extends React.Component { socket.onmessage = (event) => { log('pipe data', event.data.size); const input = ab2str(event.data); - const scrolledToBottom = term.ydisp === term.ybase; - const savedScrollPosition = term.ydisp; term.write(input); - if (!scrolledToBottom) { - this.scrollTo(savedScrollPosition); - } }; this.socket = socket; @@ -161,19 +156,6 @@ class Terminal extends React.Component { } } - scrollToBottom() { - this.scrollTo(this.term.ybase); - } - - scrollTo(y) { - if (!this.term) { - return; - } - this.term.ydisp = y; - this.term.emit('scroll', y); - this.term.refresh(0, this.term.rows - 1); - } - componentDidMount() { this.isComponentMounted = true; if (this.props.connect) { @@ -192,7 +174,6 @@ class Terminal extends React.Component { this.term.open(this.innerFlex); this.term.on('data', (data) => { - this.scrollToBottom(); if (this.socket) { this.socket.send(data); } From dcfc66811fb69939a636ceb90919b5c02c9098cf Mon Sep 17 00:00:00 2001 From: Simon Howe Date: Wed, 1 Feb 2017 18:54:01 +0100 Subject: [PATCH 3/3] Ignore xterm sourcemaps which cause warnings w/ npm run build --- client/webpack.production.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/webpack.production.config.js b/client/webpack.production.config.js index c72802d2c..5dd6c2181 100644 --- a/client/webpack.production.config.js +++ b/client/webpack.production.config.js @@ -103,7 +103,8 @@ module.exports = { new webpack.DefinePlugin(GLOBALS), new webpack.optimize.CommonsChunkPlugin('vendors', 'vendors-[chunkhash].js'), new webpack.optimize.OccurenceOrderPlugin(true), - new webpack.IgnorePlugin(/^\.\/locale$/, [/moment$/]), + new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), + new webpack.IgnorePlugin(/.*\.map$/, /xterm\/lib\/addons/), new webpack.optimize.UglifyJsPlugin({ sourceMap: false, compress: {