From e98ebadfea38447bc040e382fd879aca5db759c3 Mon Sep 17 00:00:00 2001 From: nuintun Date: Wed, 25 Nov 2015 17:56:49 +0800 Subject: [PATCH] update files --- static/js/terminal/index.js | 3 +++ static/js/terminal/lib/write.js | 6 +----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/static/js/terminal/index.js b/static/js/terminal/index.js index d7bb6bf..eb1dad8 100644 --- a/static/js/terminal/index.js +++ b/static/js/terminal/index.js @@ -56,6 +56,9 @@ function Terminal(options){ options.handler = typeof options.handler === 'function' ? options.handler : function (){}; this.handler = options.handler; + options.handleTitle = typeof options.handleTitle === 'function' ? options.handleTitle : function (){}; + this.handleTitle = options.handleTitle; + options.convertEol = options.convertEol === true; this.convertEol = options.convertEol; diff --git a/static/js/terminal/lib/write.js b/static/js/terminal/lib/write.js index 4f78794..8df7f75 100644 --- a/static/js/terminal/lib/write.js +++ b/static/js/terminal/lib/write.js @@ -412,11 +412,7 @@ module.exports = function (Terminal){ case 2: if (this.params[1]) { this.title = this.params[1]; - - //handlers could not be installed - if (typeof this.handleTitle === 'function') { - this.handleTitle(this.title); - } + this.handleTitle(this.title); } break; case 3: