update files

This commit is contained in:
nuintun
2015-11-24 23:57:02 +08:00
parent b8f2600bcd
commit a77c63998e
4 changed files with 29 additions and 5 deletions

View File

@@ -96,6 +96,10 @@ require('./lib/blankLine')(Terminal);
require('./lib/range')(Terminal);
require('./lib/util')(Terminal);
require('./lib/cursor')(Terminal);
require('./lib/scrollDisp')(Terminal);
require('./lib/esc/index.js')(Terminal);
require('./lib/esc/reset.js')(Terminal);
require('./lib/esc/tabSet.js')(Terminal);

View File

@@ -61,7 +61,6 @@ module.exports = function (Terminal){
out += '<span class="reverse-video">';
} else {
out += '<span style="';
bgColor = data & 0x1ff;
fgColor = (data >> 9) & 0x1ff;
flags = data >> 18;
@@ -70,7 +69,7 @@ module.exports = function (Terminal){
if (!Terminal.brokenBold) {
out += 'font-weight:bold;';
}
// see: XTerm*boldColors
if (fgColor < 8) fgColor += 8;
}

View File

@@ -0,0 +1,19 @@
/**
* Created by nuintun on 2015/11/24.
*/
'use strict';
module.exports = function (Terminal){
Terminal.prototype.scrollDisp = function (disp){
this.ydisp += disp;
if (this.ydisp > this.ybase) {
this.ydisp = this.ybase;
} else if (this.ydisp < 0) {
this.ydisp = 0;
}
this.refresh(0, this.rows - 1);
};
};