mirror of
https://github.com/nuintun/command-manager.git
synced 2025-08-24 12:13:54 +08:00
update files
This commit is contained in:
parent
7d09d4df0a
commit
40d80cf2ea
@ -965,6 +965,25 @@ function AnsiTerminal(cols, rows, scrollLength){
|
|||||||
*/
|
*/
|
||||||
AnsiTerminal.prototype.write = function (data){
|
AnsiTerminal.prototype.write = function (data){
|
||||||
this.AnsiParser.parse(data);
|
this.AnsiParser.parse(data);
|
||||||
|
|
||||||
|
// TODO cursor?
|
||||||
|
//// place cursor temporarily in buffer - needed to simplify fragment creation
|
||||||
|
//var node = this.screen.buffer[this.cursor.row].cells[this.cursor.col];
|
||||||
|
//
|
||||||
|
//if (this.show_cursor && node) {
|
||||||
|
// node.attr |= 4194304;
|
||||||
|
//}
|
||||||
|
//
|
||||||
|
//this.screen.buffer[this.cursor.row].version++;
|
||||||
|
//
|
||||||
|
//// remove cursor from buffer
|
||||||
|
//node = this.screen.buffer[this.cursor.row].cells[this.cursor.col];
|
||||||
|
//
|
||||||
|
//if (this.show_cursor && node) {
|
||||||
|
// node.attr &= ~4194304;
|
||||||
|
//}
|
||||||
|
//
|
||||||
|
//this.screen.buffer[this.cursor.row].version++;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Hard reset of the terminal. */
|
/** Hard reset of the terminal. */
|
||||||
@ -1056,6 +1075,7 @@ AnsiTerminal.prototype.toString = function (type){
|
|||||||
var rows = this.screen.buffer.length;
|
var rows = this.screen.buffer.length;
|
||||||
|
|
||||||
if (type === 'html') {
|
if (type === 'html') {
|
||||||
|
var text = '';
|
||||||
var line = '';
|
var line = '';
|
||||||
var style = '';
|
var style = '';
|
||||||
var attrCache;
|
var attrCache;
|
||||||
@ -1086,11 +1106,13 @@ AnsiTerminal.prototype.toString = function (type){
|
|||||||
|
|
||||||
line += node.value.replace(/\s/g, ' ');
|
line += node.value.replace(/\s/g, ' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
text += node.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
line += '</span></div>';
|
line += '</span></div>';
|
||||||
|
|
||||||
if (this.screen.buffer[i].version > 0) {
|
if (text) {
|
||||||
s += line;
|
s += line;
|
||||||
} else {
|
} else {
|
||||||
s += '<div> </div>';
|
s += '<div> </div>';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user