mirror of
https://github.com/nuintun/command-manager.git
synced 2025-07-19 00:49:37 +08:00
update files
This commit is contained in:
parent
b8f2600bcd
commit
a77c63998e
@ -126,6 +126,8 @@ module.exports = Vue.component('app-main', {
|
||||
|
||||
xterm.open();
|
||||
xtermNode.appendChild(xterm.element);
|
||||
xterm.showCursor();
|
||||
xterm.startBlink();
|
||||
|
||||
console.log(xterm);
|
||||
|
||||
@ -141,9 +143,9 @@ module.exports = Vue.component('app-main', {
|
||||
}
|
||||
} else {
|
||||
runtime.xterm.write(test);
|
||||
if (runtime.xterm.y > 10) {
|
||||
runtime.xterm.deleteLines([1]);
|
||||
//runtime.xterm.refresh(0, runtime.xterm.y);
|
||||
if (runtime.xterm.lines.length > 10) {
|
||||
runtime.xterm.deleteLines([10]);
|
||||
runtime.xterm.refresh(0, runtime.xterm.lines.length - 1);
|
||||
}
|
||||
|
||||
scroll(xtermNode);
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
19
static/js/terminal/lib/scrollDisp.js
Normal file
19
static/js/terminal/lib/scrollDisp.js
Normal 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);
|
||||
};
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user