mirror of
https://github.com/nuintun/command-manager.git
synced 2025-06-08 20:24:04 +08:00
update files
This commit is contained in:
parent
ef1690ae5f
commit
e2eb029f5a
@ -26,12 +26,10 @@ module.exports = function (Terminal){
|
|||||||
|
|
||||||
this.cursorState = 0;
|
this.cursorState = 0;
|
||||||
|
|
||||||
if (this._blink && this._blinker) {
|
|
||||||
clearInterval(this._blink);
|
clearInterval(this._blink);
|
||||||
|
|
||||||
delete this._blink;
|
delete this._blink;
|
||||||
delete this._blinker;
|
delete this._blinker;
|
||||||
}
|
|
||||||
|
|
||||||
this.refresh(this.y, this.y);
|
this.refresh(this.y, this.y);
|
||||||
}
|
}
|
||||||
@ -44,11 +42,12 @@ module.exports = function (Terminal){
|
|||||||
if (this.cursor && this.cursorBlink && Terminal.focus === this) {
|
if (this.cursor && this.cursorBlink && Terminal.focus === this) {
|
||||||
var context = this;
|
var context = this;
|
||||||
|
|
||||||
this.stopBlink();
|
clearInterval(this._blink);
|
||||||
|
|
||||||
this._blinker = function (){
|
this._blinker = function (){
|
||||||
context.cursorState ^= 1;
|
context.cursorState ^= 1;
|
||||||
|
|
||||||
context.refresh(this.y, this.y);
|
context.refresh(context.y, context.y);
|
||||||
};
|
};
|
||||||
|
|
||||||
this._blink = setInterval(this._blinker, this.cursorBlinkSpeed);
|
this._blink = setInterval(this._blinker, this.cursorBlinkSpeed);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user