mirror of
https://github.com/nuintun/command-manager.git
synced 2025-06-09 04:34:04 +08:00
update files
This commit is contained in:
parent
d9b3859480
commit
fe56467a2e
@ -53,6 +53,9 @@ function Terminal(options){
|
|||||||
this.bgColor = options.bgColor || Terminal.defaultColors.bgColor;
|
this.bgColor = options.bgColor || Terminal.defaultColors.bgColor;
|
||||||
this.fgColor = options.fgColor || Terminal.defaultColors.fgColor;
|
this.fgColor = options.fgColor || Terminal.defaultColors.fgColor;
|
||||||
|
|
||||||
|
options.handler = typeof options.handler === 'function' ? options.handler : function (){};
|
||||||
|
this.handler = options.handler;
|
||||||
|
|
||||||
this.options = options;
|
this.options = options;
|
||||||
|
|
||||||
this.ybase = 0;
|
this.ybase = 0;
|
||||||
|
@ -22,10 +22,10 @@ module.exports = function (Terminal){
|
|||||||
Terminal.prototype.startBlink = function (){
|
Terminal.prototype.startBlink = function (){
|
||||||
if (!this.cursorBlink) return;
|
if (!this.cursorBlink) return;
|
||||||
|
|
||||||
var self = this;
|
var context = this;
|
||||||
|
|
||||||
this._blinker = function (){
|
this._blinker = function (){
|
||||||
self.blinkCursor();
|
context.blinkCursor();
|
||||||
};
|
};
|
||||||
|
|
||||||
this._blink = setInterval(this._blinker, 500);
|
this._blink = setInterval(this._blinker, 500);
|
||||||
|
@ -18,12 +18,12 @@ module.exports = function (Terminal){
|
|||||||
|
|
||||||
if (!this.visualBell) return;
|
if (!this.visualBell) return;
|
||||||
|
|
||||||
var self = this;
|
var context = this;
|
||||||
|
|
||||||
this.element.style.borderColor = 'white';
|
this.element.style.borderColor = 'white';
|
||||||
|
|
||||||
setTimeout(function (){
|
setTimeout(function (){
|
||||||
self.element.style.borderColor = '';
|
context.element.style.borderColor = '';
|
||||||
}, 10);
|
}, 10);
|
||||||
|
|
||||||
if (this.popOnBell) this.focus();
|
if (this.popOnBell) this.focus();
|
||||||
@ -695,31 +695,39 @@ module.exports = function (Terminal){
|
|||||||
// Request Status String (DECRQSS).
|
// Request Status String (DECRQSS).
|
||||||
// test: echo -e '\eP$q"p\e\\'
|
// test: echo -e '\eP$q"p\e\\'
|
||||||
case '$q':
|
case '$q':
|
||||||
var pt = this.currentParam,
|
var valid = 0;
|
||||||
valid = false;
|
var pt = this.currentParam;
|
||||||
|
|
||||||
switch (pt) {
|
switch (pt) {
|
||||||
// DECSCA
|
// DECSCA
|
||||||
case '"q':
|
case '"q':
|
||||||
pt = '0"q';
|
pt = '0"q';
|
||||||
|
valid = 1;
|
||||||
break;
|
break;
|
||||||
// DECSCL
|
// DECSCL
|
||||||
case '"p':
|
case '"p':
|
||||||
pt = '61"p';
|
pt = '61"p';
|
||||||
|
valid = 1;
|
||||||
break;
|
break;
|
||||||
// DECSTBM
|
// DECSTBM
|
||||||
case 'r':
|
case 'r':
|
||||||
pt = '' + (this.scrollTop + 1) + ';' + (this.scrollBottom + 1) + 'r';
|
pt = '' + (this.scrollTop + 1) + ';' + (this.scrollBottom + 1) + 'r';
|
||||||
|
valid = 1;
|
||||||
break;
|
break;
|
||||||
// SGR
|
// SGR
|
||||||
case 'm':
|
case 'm':
|
||||||
pt = '0m';
|
pt = '0m';
|
||||||
|
valid = 1;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
this.error('Unknown DCS Pt: %s.', pt);
|
this.error('Unknown DCS Pt: %s.', pt);
|
||||||
|
|
||||||
|
valid = 0;
|
||||||
pt = '';
|
pt = '';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// -this.send('\x1bP' + valid + '$r' + pt + '\x1b\\');
|
||||||
break;
|
break;
|
||||||
// Set Termcap/Terminfo Data (xterm, experimental).
|
// Set Termcap/Terminfo Data (xterm, experimental).
|
||||||
case '+p':
|
case '+p':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user