mirror of
https://github.com/nuintun/command-manager.git
synced 2025-10-20 09:51:31 +08:00
update files
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = function (Terminal){
|
||||
Terminal.prototype.cursorBlink = function (){
|
||||
Terminal.prototype.blinkCursor = function (){
|
||||
if (Terminal.focus !== this) return;
|
||||
|
||||
this.cursorState ^= 1;
|
||||
@@ -20,19 +20,19 @@ module.exports = function (Terminal){
|
||||
};
|
||||
|
||||
Terminal.prototype.startBlink = function (){
|
||||
if (!Terminal.cursorBlink) return;
|
||||
if (!this.cursorBlink) return;
|
||||
|
||||
var self = this;
|
||||
|
||||
this._blinker = function (){
|
||||
self.cursorBlink();
|
||||
self.blinkCursor();
|
||||
};
|
||||
|
||||
this._blink = setInterval(this._blinker, 500);
|
||||
};
|
||||
|
||||
Terminal.prototype.refreshBlink = function (){
|
||||
if (!Terminal.cursorBlink) return;
|
||||
if (!this.cursorBlink) return;
|
||||
|
||||
clearInterval(this._blink);
|
||||
|
||||
|
@@ -14,4 +14,15 @@ module.exports = function (Terminal){
|
||||
Terminal.screenKeys = false;
|
||||
Terminal.programFeatures = false;
|
||||
Terminal.debug = false;
|
||||
|
||||
Terminal.defaults = {
|
||||
termName: Terminal.termName,
|
||||
cursorBlink: Terminal.cursorBlink,
|
||||
visualBell: Terminal.visualBell,
|
||||
popOnBell: Terminal.popOnBell,
|
||||
scrollback: Terminal.scrollback,
|
||||
screenKeys: Terminal.screenKeys,
|
||||
programFeatures: Terminal.programFeatures,
|
||||
debug: Terminal.debug
|
||||
};
|
||||
};
|
||||
|
@@ -107,11 +107,11 @@ module.exports = function (Terminal){
|
||||
}
|
||||
|
||||
if (bgColor !== 256) {
|
||||
out += 'background-color:' + Terminal.colors[bgColor] + ';';
|
||||
out += 'background-color:' + this.colors[bgColor] + ';';
|
||||
}
|
||||
|
||||
if (fgColor !== 257) {
|
||||
out += 'color:' + Terminal.colors[fgColor] + ';';
|
||||
out += 'color:' + this.colors[fgColor] + ';';
|
||||
}
|
||||
|
||||
out += '">';
|
||||
|
Reference in New Issue
Block a user