* Creates a new `Terminal` object.
*
* @param {object} options An object containing a set of options, the available options are:
- * - cursorBlink (boolean): Whether the terminal cursor blinks
+ * - `cursorBlink` (boolean): Whether the terminal cursor blinks
+ * - `cols` (number): The number of columns of the terminal (horizontal size)
+ * - `rows` (number): The number of rows of the terminal (vertical size)
*
* @public
* @class Xterm Xterm
this.cols = options.cols || options.geometry[0];
this.rows = options.rows || options.geometry[1];
+ this.geometry = [this.cols, this.rows];
if (options.handler) {
this.on('data', options.handler);
Terminal.loadAddon = function(addon, callback) {
if (typeof exports === 'object' && typeof module === 'object') {
// CommonJS
- return require('../addons/' + addon);
+ return require('./addons/' + addon + '/' + addon);
} else if (typeof define == 'function') {
// RequireJS
- return require(['../addons/' + addon + '/' + addon], callback);
+ return require(['./addons/' + addon + '/' + addon], callback);
} else {
console.error('Cannot load a module without a CommonJS or RequireJS environment.');
return false;
this.normal = null;
+ this.geometry = [this.cols, this.rows];
this.emit('resize', {terminal: this, cols: x, rows: y});
};