Properly support blinking cursors

This commit is contained in:
Daniel Imms
2017-09-01 12:59:18 -07:00
parent 3fc500b291
commit 076156b66e
7 changed files with 113 additions and 28 deletions
+10
View File
@@ -189,6 +189,9 @@ export class Parser {
let code;
let low;
const cursorStartX = this._terminal.buffer.x;
const cursorStartY = this._terminal.buffer.y;
if (this._terminal.debug) {
this._terminal.log('data: ' + data);
}
@@ -580,6 +583,13 @@ export class Parser {
break;
}
}
// Fire the cursormove event if it's moved. This is done inside the parser
// as a render cannot happen in the middle of a parsing round.
if (this._terminal.buffer.x !== cursorStartX || this._terminal.buffer.y !== cursorStartY) {
this._terminal.emit('cursormove');
}
return this._state;
}