mirror of
https://github.com/nuintun/command-manager.git
synced 2025-06-08 20:24:04 +08:00
13 lines
369 B
JavaScript
13 lines
369 B
JavaScript
'use strict';
|
|
|
|
module.exports = function (Terminal){
|
|
// CSI Ps b Repeat the preceding graphic character Ps times (REP).
|
|
Terminal.prototype.repeatPrecedingCharacter = function (params){
|
|
var param = params[0] || 1,
|
|
line = this.lines[this.ybase + this.y],
|
|
ch = line[this.x - 1] || [this.defAttr, ' '];
|
|
|
|
while (param--) line[this.x++] = ch;
|
|
};
|
|
};
|