Compare commits

...
8 Commits
Author SHA1 Message Date
Paris 537fbad705 Bump version to 0.33 2016-04-26 12:17:41 +03:00
Paris Kasidiaris 52cc8fa5fe Merge pull request #51 from blink1073/fix-blink
Fix cursor blink
2016-04-23 02:26:55 +03:00
Steven Silvester 7988f634f3 Handle focus clearing 2016-04-21 07:57:13 -05:00
Steven Silvester a5e34e2288 Fix cursor blink 2016-04-20 15:41:33 -05:00
Paris Kasidiaris ad3764ae4a Merge pull request #50 from blink1073/fix-resize
Use shift() when reducing lines to preserve lines up to cursor
2016-04-20 18:36:38 +03:00
Steven Silvester 685bc54bf2 Use shift to reduce lines to preserve lines up to cursor 2016-04-14 06:35:44 -05:00
Paris Kasidiaris a54eb8ac44 Merge pull request #49 from noseglid/nodejs-module
nodejs module definition
2016-04-12 14:18:03 +03:00
Alexander Olsson 6a87253d94 nodejs module definition
Allow importing xterm into  a nodejs application (for instance an electron
application, or perhaps a test environment using phantomjs which
also has a DOM),
2016-04-11 15:08:47 +02:00
3 changed files with 14 additions and 6 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
{
"name": "xterm.js",
"version": "0.32",
"version": "0.33",
"ignore": ["demo", "test", ".gitignore"]
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xterm",
"version": "0.32.0",
"version": "0.33.0",
"ignore": ["demo", "test", ".gitignore"],
"main": "src/xterm.js",
"repository": "https://github.com/sourcelair/xterm.js",
+12 -4
View File
@@ -32,7 +32,12 @@
*/
(function (xterm) {
if (typeof define == 'function') {
if (typeof exports === 'object' && typeof module === 'object') {
/*
* npm/nodejs project
*/
module.exports = xterm.call(this);
} else if (typeof define == 'function') {
/*
* Require.js is available
*/
@@ -374,6 +379,8 @@
Terminal.options = {};
Terminal.focus = null;
each(keys(Terminal.defaults), function(key) {
Terminal[key] = Terminal.defaults[key];
Terminal.options[key] = Terminal.defaults[key];
@@ -393,7 +400,7 @@
this.showCursor();
this.textarea.focus();
Terminal.focus = this;
};
Terminal.prototype.blur = function() {
@@ -408,6 +415,7 @@
if (this.sendFocus) {
this.send('\x1b[O');
}
Terminal.focus = null;
};
/**
@@ -2515,10 +2523,10 @@
} else if (j > y) {
while (j-- > y) {
if (this.lines.length > y + this.ybase) {
this.lines.pop();
this.lines.shift();
}
if (this.children.length > y) {
el = this.children.pop();
el = this.children.shift();
if (!el) continue;
el.parentNode.removeChild(el);
}