Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8fd44266a2 | ||
|
|
ef4155fbf6 | ||
|
|
92f27d3144 | ||
|
|
ee1de0980f | ||
|
|
1316682343 | ||
|
|
c48388af14 |
@@ -1,5 +1,6 @@
|
|||||||
List of xterm.js contributors. Updated before every release.
|
List of xterm.js contributors. Updated before every release.
|
||||||
|
|
||||||
|
Aleksandr Andrienko <aandrienko@codenvy.com>
|
||||||
Alessandro Nadalin <alessandro.nadalin@gmail.com>
|
Alessandro Nadalin <alessandro.nadalin@gmail.com>
|
||||||
Alexander Olsson <noseglid@gmail.com>
|
Alexander Olsson <noseglid@gmail.com>
|
||||||
Antonis Kalipetis <akalipetis@sourcelair.com>
|
Antonis Kalipetis <akalipetis@sourcelair.com>
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xterm.js",
|
"name": "xterm.js",
|
||||||
"version": "2.3.1",
|
"version": "2.3.2",
|
||||||
"ignore": ["demo", "test", ".gitignore"],
|
"ignore": ["demo", "test", ".gitignore"],
|
||||||
"main": [
|
"main": [
|
||||||
"dist/xterm.js",
|
"dist/xterm.js",
|
||||||
|
|||||||
Vendored
+31
-4
@@ -158,6 +158,8 @@ exports.CHARSETS['='] = {
|
|||||||
'~': 'û'
|
'~': 'û'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},{}],2:[function(require,module,exports){
|
},{}],2:[function(require,module,exports){
|
||||||
"use strict";
|
"use strict";
|
||||||
var CompositionHelper = (function () {
|
var CompositionHelper = (function () {
|
||||||
@@ -282,6 +284,8 @@ var CompositionHelper = (function () {
|
|||||||
}());
|
}());
|
||||||
exports.CompositionHelper = CompositionHelper;
|
exports.CompositionHelper = CompositionHelper;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},{}],3:[function(require,module,exports){
|
},{}],3:[function(require,module,exports){
|
||||||
"use strict";
|
"use strict";
|
||||||
var C0;
|
var C0;
|
||||||
@@ -323,6 +327,8 @@ var C0;
|
|||||||
})(C0 = exports.C0 || (exports.C0 = {}));
|
})(C0 = exports.C0 || (exports.C0 = {}));
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},{}],4:[function(require,module,exports){
|
},{}],4:[function(require,module,exports){
|
||||||
"use strict";
|
"use strict";
|
||||||
;
|
;
|
||||||
@@ -378,6 +384,8 @@ var EventEmitter = (function () {
|
|||||||
}());
|
}());
|
||||||
exports.EventEmitter = EventEmitter;
|
exports.EventEmitter = EventEmitter;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},{}],5:[function(require,module,exports){
|
},{}],5:[function(require,module,exports){
|
||||||
"use strict";
|
"use strict";
|
||||||
var EscapeSequences_1 = require("./EscapeSequences");
|
var EscapeSequences_1 = require("./EscapeSequences");
|
||||||
@@ -1302,6 +1310,8 @@ var wcwidth = (function (opts) {
|
|||||||
return wcwidth;
|
return wcwidth;
|
||||||
})({ nul: 0, control: 0 });
|
})({ nul: 0, control: 0 });
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},{"./Charsets":1,"./EscapeSequences":3}],6:[function(require,module,exports){
|
},{"./Charsets":1,"./EscapeSequences":3}],6:[function(require,module,exports){
|
||||||
"use strict";
|
"use strict";
|
||||||
var EscapeSequences_1 = require("./EscapeSequences");
|
var EscapeSequences_1 = require("./EscapeSequences");
|
||||||
@@ -1775,6 +1785,8 @@ var Parser = (function () {
|
|||||||
}());
|
}());
|
||||||
exports.Parser = Parser;
|
exports.Parser = Parser;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},{"./Charsets":1,"./EscapeSequences":3}],7:[function(require,module,exports){
|
},{"./Charsets":1,"./EscapeSequences":3}],7:[function(require,module,exports){
|
||||||
"use strict";
|
"use strict";
|
||||||
var MAX_REFRESH_FRAME_SKIP = 5;
|
var MAX_REFRESH_FRAME_SKIP = 5;
|
||||||
@@ -1984,10 +1996,13 @@ function checkBoldBroken(document) {
|
|||||||
return w1 !== w2;
|
return w1 !== w2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},{}],8:[function(require,module,exports){
|
},{}],8:[function(require,module,exports){
|
||||||
"use strict";
|
"use strict";
|
||||||
var Viewport = (function () {
|
var Viewport = (function () {
|
||||||
function Viewport(terminal, viewportElement, scrollArea, charMeasure) {
|
function Viewport(terminal, viewportElement, scrollArea, charMeasure) {
|
||||||
|
var _this = this;
|
||||||
this.terminal = terminal;
|
this.terminal = terminal;
|
||||||
this.viewportElement = viewportElement;
|
this.viewportElement = viewportElement;
|
||||||
this.scrollArea = scrollArea;
|
this.scrollArea = scrollArea;
|
||||||
@@ -1998,7 +2013,7 @@ var Viewport = (function () {
|
|||||||
this.terminal.on('scroll', this.syncScrollArea.bind(this));
|
this.terminal.on('scroll', this.syncScrollArea.bind(this));
|
||||||
this.terminal.on('resize', this.syncScrollArea.bind(this));
|
this.terminal.on('resize', this.syncScrollArea.bind(this));
|
||||||
this.viewportElement.addEventListener('scroll', this.onScroll.bind(this));
|
this.viewportElement.addEventListener('scroll', this.onScroll.bind(this));
|
||||||
this.syncScrollArea();
|
setTimeout(function () { return _this.syncScrollArea(); }, 0);
|
||||||
}
|
}
|
||||||
Viewport.prototype.refresh = function () {
|
Viewport.prototype.refresh = function () {
|
||||||
if (this.charMeasure.height > 0) {
|
if (this.charMeasure.height > 0) {
|
||||||
@@ -2058,6 +2073,8 @@ var Viewport = (function () {
|
|||||||
}());
|
}());
|
||||||
exports.Viewport = Viewport;
|
exports.Viewport = Viewport;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},{}],9:[function(require,module,exports){
|
},{}],9:[function(require,module,exports){
|
||||||
"use strict";
|
"use strict";
|
||||||
function prepareTextForClipboard(text) {
|
function prepareTextForClipboard(text) {
|
||||||
@@ -2137,6 +2154,8 @@ function rightClickHandler(ev, term) {
|
|||||||
}
|
}
|
||||||
exports.rightClickHandler = rightClickHandler;
|
exports.rightClickHandler = rightClickHandler;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},{}],10:[function(require,module,exports){
|
},{}],10:[function(require,module,exports){
|
||||||
"use strict";
|
"use strict";
|
||||||
var Generic_1 = require("./Generic");
|
var Generic_1 = require("./Generic");
|
||||||
@@ -2150,12 +2169,12 @@ exports.isIpad = platform === 'iPad';
|
|||||||
exports.isIphone = platform === 'iPhone';
|
exports.isIphone = platform === 'iPhone';
|
||||||
exports.isMSWindows = Generic_1.contains(['Windows', 'Win16', 'Win32', 'WinCE'], platform);
|
exports.isMSWindows = Generic_1.contains(['Windows', 'Win16', 'Win32', 'WinCE'], platform);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},{"./Generic":13}],11:[function(require,module,exports){
|
},{"./Generic":13}],11:[function(require,module,exports){
|
||||||
"use strict";
|
"use strict";
|
||||||
var __extends = (this && this.__extends) || function (d, b) {
|
var __extends = (this && this.__extends) || function (d, b) {
|
||||||
for (var p in b)
|
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
||||||
if (b.hasOwnProperty(p))
|
|
||||||
d[p] = b[p];
|
|
||||||
function __() { this.constructor = d; }
|
function __() { this.constructor = d; }
|
||||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||||
};
|
};
|
||||||
@@ -2211,6 +2230,8 @@ var CharMeasure = (function (_super) {
|
|||||||
}(EventEmitter_js_1.EventEmitter));
|
}(EventEmitter_js_1.EventEmitter));
|
||||||
exports.CharMeasure = CharMeasure;
|
exports.CharMeasure = CharMeasure;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},{"../EventEmitter.js":4}],12:[function(require,module,exports){
|
},{"../EventEmitter.js":4}],12:[function(require,module,exports){
|
||||||
"use strict";
|
"use strict";
|
||||||
var CircularList = (function () {
|
var CircularList = (function () {
|
||||||
@@ -2347,6 +2368,8 @@ var CircularList = (function () {
|
|||||||
}());
|
}());
|
||||||
exports.CircularList = CircularList;
|
exports.CircularList = CircularList;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},{}],13:[function(require,module,exports){
|
},{}],13:[function(require,module,exports){
|
||||||
"use strict";
|
"use strict";
|
||||||
function contains(arr, el) {
|
function contains(arr, el) {
|
||||||
@@ -2355,6 +2378,8 @@ function contains(arr, el) {
|
|||||||
exports.contains = contains;
|
exports.contains = contains;
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},{}],14:[function(require,module,exports){
|
},{}],14:[function(require,module,exports){
|
||||||
"use strict";
|
"use strict";
|
||||||
var CompositionHelper_1 = require("./CompositionHelper");
|
var CompositionHelper_1 = require("./CompositionHelper");
|
||||||
@@ -3865,6 +3890,8 @@ Terminal.off = off;
|
|||||||
Terminal.cancel = cancel;
|
Terminal.cancel = cancel;
|
||||||
module.exports = Terminal;
|
module.exports = Terminal;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},{"./CompositionHelper":2,"./EscapeSequences":3,"./EventEmitter":4,"./InputHandler":5,"./Parser":6,"./Renderer":7,"./Viewport":8,"./handlers/Clipboard":9,"./utils/Browser":10,"./utils/CharMeasure":11,"./utils/CircularList":12}]},{},[14])(14)
|
},{"./CompositionHelper":2,"./EscapeSequences":3,"./EventEmitter":4,"./InputHandler":5,"./Parser":6,"./Renderer":7,"./Viewport":8,"./handlers/Clipboard":9,"./utils/Browser":10,"./utils/CharMeasure":11,"./utils/CircularList":12}]},{},[14])(14)
|
||||||
});
|
});
|
||||||
//# sourceMappingURL=xterm.js.map
|
//# sourceMappingURL=xterm.js.map
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -7,7 +7,6 @@ const sorcery = require('sorcery');
|
|||||||
const source = require('vinyl-source-stream');
|
const source = require('vinyl-source-stream');
|
||||||
const sourcemaps = require('gulp-sourcemaps');
|
const sourcemaps = require('gulp-sourcemaps');
|
||||||
const ts = require('gulp-typescript');
|
const ts = require('gulp-typescript');
|
||||||
const tsify = require('tsify');
|
|
||||||
|
|
||||||
|
|
||||||
let buildDir = process.env.BUILD_DIR || 'build';
|
let buildDir = process.env.BUILD_DIR || 'build';
|
||||||
@@ -53,7 +52,6 @@ gulp.task('browserify', ['tsc'], function() {
|
|||||||
packageCache: {}
|
packageCache: {}
|
||||||
};
|
};
|
||||||
let bundleStream = browserify(browserifyOptions)
|
let bundleStream = browserify(browserifyOptions)
|
||||||
.plugin(tsify)
|
|
||||||
.bundle()
|
.bundle()
|
||||||
.pipe(source('xterm.js'))
|
.pipe(source('xterm.js'))
|
||||||
.pipe(buffer())
|
.pipe(buffer())
|
||||||
|
|||||||
+1
-2
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "xterm",
|
"name": "xterm",
|
||||||
"description": "Full xterm terminal, in your browser",
|
"description": "Full xterm terminal, in your browser",
|
||||||
"version": "2.3.1",
|
"version": "2.3.2",
|
||||||
"ignore": [
|
"ignore": [
|
||||||
"demo",
|
"demo",
|
||||||
"test",
|
"test",
|
||||||
@@ -56,7 +56,6 @@
|
|||||||
"nodemon": "1.10.2",
|
"nodemon": "1.10.2",
|
||||||
"sleep": "^3.0.1",
|
"sleep": "^3.0.1",
|
||||||
"sorcery": "^0.10.0",
|
"sorcery": "^0.10.0",
|
||||||
"tsify": "^3.0.0",
|
|
||||||
"tslint": "^4.0.2",
|
"tslint": "^4.0.2",
|
||||||
"typescript": "^2.0.3",
|
"typescript": "^2.0.3",
|
||||||
"vinyl-buffer": "^1.0.0",
|
"vinyl-buffer": "^1.0.0",
|
||||||
|
|||||||
+26
-18
@@ -41,13 +41,17 @@ describe('Viewport', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('refresh', () => {
|
describe('refresh', () => {
|
||||||
it('should set the line-height of the terminal', () => {
|
it('should set the line-height of the terminal', done => {
|
||||||
assert.equal(viewportElement.style.lineHeight, CHARACTER_HEIGHT + 'px');
|
// Allow CharMeasure to be initialized
|
||||||
assert.equal(terminal.rowContainer.style.lineHeight, CHARACTER_HEIGHT + 'px');
|
setTimeout(() => {
|
||||||
charMeasure.height = 1;
|
assert.equal(viewportElement.style.lineHeight, CHARACTER_HEIGHT + 'px');
|
||||||
viewport.refresh();
|
assert.equal(terminal.rowContainer.style.lineHeight, CHARACTER_HEIGHT + 'px');
|
||||||
assert.equal(viewportElement.style.lineHeight, '1px');
|
charMeasure.height = 1;
|
||||||
assert.equal(terminal.rowContainer.style.lineHeight, '1px');
|
viewport.refresh();
|
||||||
|
assert.equal(viewportElement.style.lineHeight, '1px');
|
||||||
|
assert.equal(terminal.rowContainer.style.lineHeight, '1px');
|
||||||
|
done();
|
||||||
|
}, 0);
|
||||||
});
|
});
|
||||||
it('should set the height of the viewport when the line-height changed', () => {
|
it('should set the height of the viewport when the line-height changed', () => {
|
||||||
terminal.lines.push('');
|
terminal.lines.push('');
|
||||||
@@ -62,17 +66,21 @@ describe('Viewport', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('syncScrollArea', () => {
|
describe('syncScrollArea', () => {
|
||||||
it('should sync the scroll area', () => {
|
it('should sync the scroll area', done => {
|
||||||
terminal.lines.push('');
|
// Allow CharMeasure to be initialized
|
||||||
terminal.rows = 1;
|
setTimeout(() => {
|
||||||
assert.equal(scrollAreaElement.style.height, 0 * CHARACTER_HEIGHT + 'px');
|
terminal.lines.push('');
|
||||||
viewport.syncScrollArea();
|
terminal.rows = 1;
|
||||||
assert.equal(viewportElement.style.height, 1 * CHARACTER_HEIGHT + 'px');
|
assert.equal(scrollAreaElement.style.height, 0 * CHARACTER_HEIGHT + 'px');
|
||||||
assert.equal(scrollAreaElement.style.height, 1 * CHARACTER_HEIGHT + 'px');
|
viewport.syncScrollArea();
|
||||||
terminal.lines.push('');
|
assert.equal(viewportElement.style.height, 1 * CHARACTER_HEIGHT + 'px');
|
||||||
viewport.syncScrollArea();
|
assert.equal(scrollAreaElement.style.height, 1 * CHARACTER_HEIGHT + 'px');
|
||||||
assert.equal(viewportElement.style.height, 1 * CHARACTER_HEIGHT + 'px');
|
terminal.lines.push('');
|
||||||
assert.equal(scrollAreaElement.style.height, 2 * CHARACTER_HEIGHT + 'px');
|
viewport.syncScrollArea();
|
||||||
|
assert.equal(viewportElement.style.height, 1 * CHARACTER_HEIGHT + 'px');
|
||||||
|
assert.equal(scrollAreaElement.style.height, 2 * CHARACTER_HEIGHT + 'px');
|
||||||
|
done();
|
||||||
|
}, 0);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
+2
-1
@@ -35,7 +35,8 @@ export class Viewport {
|
|||||||
this.terminal.on('resize', this.syncScrollArea.bind(this));
|
this.terminal.on('resize', this.syncScrollArea.bind(this));
|
||||||
this.viewportElement.addEventListener('scroll', this.onScroll.bind(this));
|
this.viewportElement.addEventListener('scroll', this.onScroll.bind(this));
|
||||||
|
|
||||||
this.syncScrollArea();
|
// Perform this async to ensure the CharMeasure is ready.
|
||||||
|
setTimeout(() => this.syncScrollArea(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user