mirror of
https://github.com/nuintun/command-manager.git
synced 2025-10-20 01:27:47 +08:00
update files
This commit is contained in:
@@ -56,7 +56,7 @@ function Terminal(options){
|
||||
options.handler = typeof options.handler === 'function' ? options.handler : function (){};
|
||||
this.handler = options.handler;
|
||||
|
||||
options.convertEol = options.convertEol === false;
|
||||
options.convertEol = options.convertEol !== false;
|
||||
this.convertEol = options.convertEol;
|
||||
|
||||
this.options = options;
|
||||
|
@@ -6,10 +6,6 @@
|
||||
|
||||
var states = require('./states');
|
||||
|
||||
function fixLinefeed(data){
|
||||
return data.replace(/([^\r])\n/g, '$1\r\n');
|
||||
}
|
||||
|
||||
module.exports = function (Terminal){
|
||||
Terminal.prototype.send = function (data){
|
||||
var context = this;
|
||||
@@ -44,8 +40,6 @@ module.exports = function (Terminal){
|
||||
};
|
||||
|
||||
Terminal.prototype.write = function (data){
|
||||
data = fixLinefeed(data);
|
||||
|
||||
var l = data.length;
|
||||
var i = 0;
|
||||
var ch = null;
|
||||
|
Reference in New Issue
Block a user