command-manager/static/js/terminal/lib/csi/repeatPrecedingCharacter.js
2015-11-24 21:43:56 +08:00

17 lines
415 B
JavaScript

/**
* Created by nuintun on 2015/11/24.
*/
'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;
};
};