mirror of
https://github.com/nuintun/command-manager.git
synced 2025-10-20 09:51:31 +08:00
update files
This commit is contained in:
@@ -74,6 +74,44 @@ module.exports = function (Terminal){
|
||||
this.updateRange(this.scrollBottom);
|
||||
};
|
||||
|
||||
// CSI P m SP }
|
||||
// Insert P s Column(s) (default = 1) (DECIC), VT420 and up.
|
||||
// NOTE: xterm doesn't enable this code by default.
|
||||
Terminal.prototype.insertColumns = function (params){
|
||||
var param = params[0];
|
||||
var l = this.ybase + this.rows;
|
||||
var ch = [this.eraseAttr(), ' ']; // xterm
|
||||
var i;
|
||||
|
||||
while (param--) {
|
||||
for (i = this.ybase; i < l; i++) {
|
||||
this.lines[i].splice(this.x + 1, 0, ch);
|
||||
this.lines[i].pop();
|
||||
}
|
||||
}
|
||||
|
||||
this.maxRange();
|
||||
};
|
||||
|
||||
// CSI P m SP ~
|
||||
// Delete P s Column(s) (default = 1) (DECDC), VT420 and up
|
||||
// NOTE: xterm doesn't enable this code by default.
|
||||
Terminal.prototype.deleteColumns = function (params){
|
||||
var param = params[0];
|
||||
var l = this.ybase + this.rows;
|
||||
var ch = [this.eraseAttr(), ' ']; // xterm
|
||||
var i;
|
||||
|
||||
while (param--) {
|
||||
for (i = this.ybase; i < l; i++) {
|
||||
this.lines[i].splice(this.x, 1);
|
||||
this.lines[i].push(ch);
|
||||
}
|
||||
}
|
||||
|
||||
this.maxRange();
|
||||
};
|
||||
|
||||
// CSI Ps P
|
||||
// Delete Ps Character(s) (default = 1) (DCH).
|
||||
Terminal.prototype.deleteChars = function (params){
|
||||
|
33
static/js/terminal/lib/csi/scroll.js
Normal file
33
static/js/terminal/lib/csi/scroll.js
Normal file
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* Created by nuintun on 2015/11/25.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports = function (Terminal){
|
||||
// CSI Ps S Scroll up Ps lines (default = 1) (SU).
|
||||
Terminal.prototype.scrollUp = function (params){
|
||||
var param = params[0] || 1;
|
||||
|
||||
while (param--) {
|
||||
this.lines.splice(this.ybase + this.scrollTop, 1);
|
||||
this.lines.splice(this.ybase + this.scrollBottom, 0, this.blankLine());
|
||||
}
|
||||
|
||||
this.updateRange(this.scrollTop);
|
||||
this.updateRange(this.scrollBottom);
|
||||
};
|
||||
|
||||
// CSI Ps T Scroll down Ps lines (default = 1) (SD).
|
||||
Terminal.prototype.scrollDown = function (params){
|
||||
var param = params[0] || 1;
|
||||
|
||||
while (param--) {
|
||||
this.lines.splice(this.ybase + this.scrollBottom, 1);
|
||||
this.lines.splice(this.ybase + this.scrollTop, 0, this.blankLine());
|
||||
}
|
||||
|
||||
this.updateRange(this.scrollTop);
|
||||
this.updateRange(this.scrollBottom);
|
||||
};
|
||||
};
|
Reference in New Issue
Block a user