Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2221f70ff0 | ||
|
|
daad8d9c04 | ||
|
|
03d26e39c7 | ||
|
|
64d3c089a2 | ||
|
|
938c011e63 | ||
|
|
66f6b88333 | ||
|
|
35f746c925 | ||
|
|
944da28089 | ||
|
|
8f3e2b645a | ||
|
|
82b2a5305f | ||
|
|
6a2852ee26 | ||
|
|
526d6c4da9 | ||
|
|
46d62f4972 | ||
|
|
5cafcdb695 | ||
|
|
2674258ead | ||
|
|
b38be3a1d0 | ||
|
|
18a9f05626 | ||
|
|
bf34980c43 |
@@ -24,14 +24,17 @@ Dan Kaplun <dbkaplun@twitch.tv>
|
|||||||
Darin Morrison <freebroccolo@users.noreply.github.com>
|
Darin Morrison <freebroccolo@users.noreply.github.com>
|
||||||
Edgar Andrés Margffoy Tuay <andfoy@gmail.com>
|
Edgar Andrés Margffoy Tuay <andfoy@gmail.com>
|
||||||
Elliot Saba <staticfloat@gmail.com>
|
Elliot Saba <staticfloat@gmail.com>
|
||||||
|
Gary Ritchie <gary@rstudio.com>
|
||||||
hiro-su <h.sugipon@gmail.com>
|
hiro-su <h.sugipon@gmail.com>
|
||||||
Ian Lewis <ianlewis@google.com>
|
Ian Lewis <ianlewis@google.com>
|
||||||
imoses <ido@twiggle.com>
|
imoses <ido@twiggle.com>
|
||||||
InDieTasten <indietasten@gmail.com>
|
InDieTasten <indietasten@gmail.com>
|
||||||
Jean Bruenn <himself@jeanbruenn.info>
|
Jean Bruenn <himself@jeanbruenn.info>
|
||||||
Jörg Breitbart <jerch@rockborn.de>
|
Jörg Breitbart <jerch@rockborn.de>
|
||||||
|
Justin Mecham <justin@mecham.me>
|
||||||
Lucian Buzzo <lucian.buzzo@gmail.com>
|
Lucian Buzzo <lucian.buzzo@gmail.com>
|
||||||
Maël Nison <nison.mael@gmail.com>
|
Maël Nison <nison.mael@gmail.com>
|
||||||
|
Martin Chloride <i@martincl2.me>
|
||||||
Martin Wang <jiahaow@ca.ibm.com>
|
Martin Wang <jiahaow@ca.ibm.com>
|
||||||
Michael Irwin <mikesir87@gmail.com>
|
Michael Irwin <mikesir87@gmail.com>
|
||||||
Mikko Karvonen <mikko.karvonen@arm.com>
|
Mikko Karvonen <mikko.karvonen@arm.com>
|
||||||
@@ -40,6 +43,7 @@ Paris Kasidiaris <pariskasidiaris@gmail.com>
|
|||||||
Paris Kasidiaris <paris@sourcelair.com>
|
Paris Kasidiaris <paris@sourcelair.com>
|
||||||
runarberg <runar@greenqloud.com>
|
runarberg <runar@greenqloud.com>
|
||||||
Saswat Das <saswatds@users.noreply.github.com>
|
Saswat Das <saswatds@users.noreply.github.com>
|
||||||
|
Saul Costa <saul@codevolve.com>
|
||||||
Shuanglei Tao <tsl0922@gmail.com>
|
Shuanglei Tao <tsl0922@gmail.com>
|
||||||
Steven Silvester <steven.silvester@ieee.org>
|
Steven Silvester <steven.silvester@ieee.org>
|
||||||
Thanasis Daglis <thanasis@sourcelair.com>
|
Thanasis Daglis <thanasis@sourcelair.com>
|
||||||
|
|||||||
@@ -32,6 +32,10 @@ Xterm.js is used in several world-class applications to provide great terminal e
|
|||||||
- [**WebSSH2**](https://github.com/billchurch/WebSSH2): A web based SSH2 client using `xterm.js`, socket.io, and ssh2.
|
- [**WebSSH2**](https://github.com/billchurch/WebSSH2): A web based SSH2 client using `xterm.js`, socket.io, and ssh2.
|
||||||
- [**Spyder Terminal**](https://github.com/spyder-ide/spyder-terminal): A full fledged system terminal embedded on Spyder IDE.
|
- [**Spyder Terminal**](https://github.com/spyder-ide/spyder-terminal): A full fledged system terminal embedded on Spyder IDE.
|
||||||
- [**Cloud Commander**](https://cloudcmd.io "Cloud Commander"): Orthodox web file manager with console and editor.
|
- [**Cloud Commander**](https://cloudcmd.io "Cloud Commander"): Orthodox web file manager with console and editor.
|
||||||
|
- [**Codevolve**](https://www.codevolve.com "Codevolve"): Online platform for interactive coding and web development courses. Live container-backed terminal uses `xterm.js`.
|
||||||
|
- [**RStudio**](https://www.rstudio.com/products/RStudio "RStudio"): RStudio is an integrated development environment (IDE) for R.
|
||||||
|
- [**Terminal for Atom**](https://github.com/jsmecham/atom-terminal-tab): A simple terminal for the Atom text editor.
|
||||||
|
- [**Eclipse Orion**](https://orionhub.org): A modern, open source software development environment that runs in the cloud. Code, deploy and run in the cloud.
|
||||||
|
|
||||||
Do you use xterm.js in your application as well? Please [open a Pull Request](https://github.com/sourcelair/xterm.js/pulls) to include it here. We would love to have it in our list.
|
Do you use xterm.js in your application as well? Please [open a Pull Request](https://github.com/sourcelair/xterm.js/pulls) to include it here. We would love to have it in our list.
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xterm.js",
|
"name": "xterm.js",
|
||||||
"version": "2.5.0",
|
"version": "2.6.0",
|
||||||
"ignore": ["demo", "test", ".gitignore"],
|
"ignore": ["demo", "test", ".gitignore"],
|
||||||
"main": [
|
"main": [
|
||||||
"dist/xterm.js",
|
"dist/xterm.js",
|
||||||
|
|||||||
@@ -19,6 +19,16 @@
|
|||||||
<p>
|
<p>
|
||||||
<label><input type="checkbox" id="option-cursor-blink"> cursorBlink</label>
|
<label><input type="checkbox" id="option-cursor-blink"> cursorBlink</label>
|
||||||
</p>
|
</p>
|
||||||
|
<p>
|
||||||
|
<label>
|
||||||
|
cursorStyle
|
||||||
|
<select id="option-cursor-style">
|
||||||
|
<option value="block">block</option>
|
||||||
|
<option value="underline">underline</option>
|
||||||
|
<option value="bar">bar</option>
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<label>scrollback <input type="number" id="option-scrollback" value="1000" /></label>
|
<label>scrollback <input type="number" id="option-scrollback" value="1000" /></label>
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ var term,
|
|||||||
var terminalContainer = document.getElementById('terminal-container'),
|
var terminalContainer = document.getElementById('terminal-container'),
|
||||||
optionElements = {
|
optionElements = {
|
||||||
cursorBlink: document.querySelector('#option-cursor-blink'),
|
cursorBlink: document.querySelector('#option-cursor-blink'),
|
||||||
|
cursorStyle: document.querySelector('#option-cursor-style'),
|
||||||
scrollback: document.querySelector('#option-scrollback'),
|
scrollback: document.querySelector('#option-scrollback'),
|
||||||
tabstopwidth: document.querySelector('#option-tabstopwidth')
|
tabstopwidth: document.querySelector('#option-tabstopwidth')
|
||||||
},
|
},
|
||||||
@@ -32,6 +33,9 @@ rowsElement.addEventListener('change', setTerminalSize);
|
|||||||
optionElements.cursorBlink.addEventListener('change', function () {
|
optionElements.cursorBlink.addEventListener('change', function () {
|
||||||
term.setOption('cursorBlink', optionElements.cursorBlink.checked);
|
term.setOption('cursorBlink', optionElements.cursorBlink.checked);
|
||||||
});
|
});
|
||||||
|
optionElements.cursorStyle.addEventListener('change', function () {
|
||||||
|
term.setOption('cursorStyle', optionElements.cursorStyle.value);
|
||||||
|
});
|
||||||
optionElements.scrollback.addEventListener('change', function () {
|
optionElements.scrollback.addEventListener('change', function () {
|
||||||
term.setOption('scrollback', parseInt(optionElements.scrollback.value, 10));
|
term.setOption('scrollback', parseInt(optionElements.scrollback.value, 10));
|
||||||
});
|
});
|
||||||
|
|||||||
Vendored
+13
-2
@@ -3008,7 +3008,7 @@ Terminal.prototype.insertRow = function (row) {
|
|||||||
this.children.push(row);
|
this.children.push(row);
|
||||||
return row;
|
return row;
|
||||||
};
|
};
|
||||||
Terminal.prototype.open = function (parent) {
|
Terminal.prototype.open = function (parent, focus) {
|
||||||
var self = this, i = 0, div;
|
var self = this, i = 0, div;
|
||||||
this.parent = parent || this.parent;
|
this.parent = parent || this.parent;
|
||||||
if (!this.parent) {
|
if (!this.parent) {
|
||||||
@@ -3070,7 +3070,16 @@ Terminal.prototype.open = function (parent) {
|
|||||||
this.renderer = new Renderer_1.Renderer(this);
|
this.renderer = new Renderer_1.Renderer(this);
|
||||||
this.refresh(0, this.rows - 1);
|
this.refresh(0, this.rows - 1);
|
||||||
this.initGlobal();
|
this.initGlobal();
|
||||||
this.focus();
|
if (typeof focus == 'undefined') {
|
||||||
|
var message = 'You did not pass the `focus` argument in `Terminal.prototype.open()`.\n';
|
||||||
|
message += 'The `focus` argument now defaults to `true` but starting with xterm.js 3.0 ';
|
||||||
|
message += 'it will default to `false`.';
|
||||||
|
console.warn(message);
|
||||||
|
focus = true;
|
||||||
|
}
|
||||||
|
if (focus) {
|
||||||
|
this.focus();
|
||||||
|
}
|
||||||
on(this.element, 'click', function () {
|
on(this.element, 'click', function () {
|
||||||
var selection = document.getSelection(), collapsed = selection.isCollapsed, isRange = typeof collapsed == 'boolean' ? !collapsed : selection.type == 'Range';
|
var selection = document.getSelection(), collapsed = selection.isCollapsed, isRange = typeof collapsed == 'boolean' ? !collapsed : selection.type == 'Range';
|
||||||
if (!isRange) {
|
if (!isRange) {
|
||||||
@@ -4091,8 +4100,10 @@ Terminal.prototype.reset = function () {
|
|||||||
this.options.rows = this.rows;
|
this.options.rows = this.rows;
|
||||||
this.options.cols = this.cols;
|
this.options.cols = this.cols;
|
||||||
var customKeydownHandler = this.customKeydownHandler;
|
var customKeydownHandler = this.customKeydownHandler;
|
||||||
|
var cursorBlinkInterval = this.cursorBlinkInterval;
|
||||||
Terminal.call(this, this.options);
|
Terminal.call(this, this.options);
|
||||||
this.customKeydownHandler = customKeydownHandler;
|
this.customKeydownHandler = customKeydownHandler;
|
||||||
|
this.cursorBlinkInterval = cursorBlinkInterval;
|
||||||
this.refresh(0, this.rows - 1);
|
this.refresh(0, this.rows - 1);
|
||||||
this.viewport.syncScrollArea();
|
this.viewport.syncScrollArea();
|
||||||
};
|
};
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -83,6 +83,7 @@ gulp.task('instrument-test', function () {
|
|||||||
gulp.task('mocha', ['instrument-test'], function () {
|
gulp.task('mocha', ['instrument-test'], function () {
|
||||||
return gulp.src([`${outDir}/*test.js`, `${outDir}/**/*test.js`], {read: false})
|
return gulp.src([`${outDir}/*test.js`, `${outDir}/**/*test.js`], {read: false})
|
||||||
.pipe(mocha())
|
.pipe(mocha())
|
||||||
|
.once('error', () => process.exit(1))
|
||||||
.pipe(istanbul.writeReports());
|
.pipe(istanbul.writeReports());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "xterm",
|
"name": "xterm",
|
||||||
"description": "Full xterm terminal, in your browser",
|
"description": "Full xterm terminal, in your browser",
|
||||||
"version": "2.5.0",
|
"version": "2.6.0",
|
||||||
"ignore": [
|
"ignore": [
|
||||||
"demo",
|
"demo",
|
||||||
"test",
|
"test",
|
||||||
|
|||||||
+22
-4
@@ -607,8 +607,9 @@ Terminal.prototype.insertRow = function (row) {
|
|||||||
* Opens the terminal within an element.
|
* Opens the terminal within an element.
|
||||||
*
|
*
|
||||||
* @param {HTMLElement} parent The element to create the terminal within.
|
* @param {HTMLElement} parent The element to create the terminal within.
|
||||||
|
* @param {boolean} focus Focus the terminal, after it gets instantiated in the DOM
|
||||||
*/
|
*/
|
||||||
Terminal.prototype.open = function(parent) {
|
Terminal.prototype.open = function(parent, focus) {
|
||||||
var self=this, i=0, div;
|
var self=this, i=0, div;
|
||||||
|
|
||||||
this.parent = parent || this.parent;
|
this.parent = parent || this.parent;
|
||||||
@@ -629,7 +630,7 @@ Terminal.prototype.open = function(parent) {
|
|||||||
this.element.classList.add('xterm-theme-' + this.theme);
|
this.element.classList.add('xterm-theme-' + this.theme);
|
||||||
this.setCursorBlinking(this.options.cursorBlink);
|
this.setCursorBlinking(this.options.cursorBlink);
|
||||||
|
|
||||||
this.element.style.height
|
this.element.style.height;
|
||||||
this.element.setAttribute('tabindex', 0);
|
this.element.setAttribute('tabindex', 0);
|
||||||
|
|
||||||
this.viewportElement = document.createElement('div');
|
this.viewportElement = document.createElement('div');
|
||||||
@@ -696,8 +697,23 @@ Terminal.prototype.open = function(parent) {
|
|||||||
// need to be taken on the document.
|
// need to be taken on the document.
|
||||||
this.initGlobal();
|
this.initGlobal();
|
||||||
|
|
||||||
// Ensure there is a Terminal.focus.
|
/**
|
||||||
this.focus();
|
* Automatic focus functionality.
|
||||||
|
* TODO: Default to `false` starting with xterm.js 3.0.
|
||||||
|
*/
|
||||||
|
if (typeof focus == 'undefined') {
|
||||||
|
let message = 'You did not pass the `focus` argument in `Terminal.prototype.open()`.\n';
|
||||||
|
|
||||||
|
message += 'The `focus` argument now defaults to `true` but starting with xterm.js 3.0 ';
|
||||||
|
message += 'it will default to `false`.';
|
||||||
|
|
||||||
|
console.warn(message);
|
||||||
|
focus = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (focus) {
|
||||||
|
this.focus();
|
||||||
|
}
|
||||||
|
|
||||||
on(this.element, 'click', function() {
|
on(this.element, 'click', function() {
|
||||||
var selection = document.getSelection(),
|
var selection = document.getSelection(),
|
||||||
@@ -2193,8 +2209,10 @@ Terminal.prototype.reset = function() {
|
|||||||
this.options.rows = this.rows;
|
this.options.rows = this.rows;
|
||||||
this.options.cols = this.cols;
|
this.options.cols = this.cols;
|
||||||
var customKeydownHandler = this.customKeydownHandler;
|
var customKeydownHandler = this.customKeydownHandler;
|
||||||
|
var cursorBlinkInterval = this.cursorBlinkInterval;
|
||||||
Terminal.call(this, this.options);
|
Terminal.call(this, this.options);
|
||||||
this.customKeydownHandler = customKeydownHandler;
|
this.customKeydownHandler = customKeydownHandler;
|
||||||
|
this.cursorBlinkInterval = cursorBlinkInterval;
|
||||||
this.refresh(0, this.rows - 1);
|
this.refresh(0, this.rows - 1);
|
||||||
this.viewport.syncScrollArea();
|
this.viewport.syncScrollArea();
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user