Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
59ebbbaaf0 | ||
|
|
6e6b5dad8c | ||
|
|
0b603952c3 |
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "xterm.js",
|
"name": "xterm.js",
|
||||||
"version": "0.8",
|
"version": "0.9.2",
|
||||||
"ignore": ["demo", "docs", "test", ".gitignore"]
|
"ignore": ["demo", "docs", "test", ".gitignore"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,12 +40,17 @@
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
outline: none;
|
outline: none;
|
||||||
font-family: courier-new, courier, monospace;
|
font-family: courier-new, courier, monospace;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.xterm .terminal-cursor {
|
.xterm .terminal-cursor {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.xterm .xterm-helpers {
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
.xterm .xterm-helper-textarea {
|
.xterm .xterm-helper-textarea {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
width: 0;
|
width: 0;
|
||||||
|
|||||||
+3
-7
@@ -568,9 +568,7 @@ Terminal.prototype.open = function(parent) {
|
|||||||
|
|
||||||
on(this.element, 'mouseup', function() {
|
on(this.element, 'mouseup', function() {
|
||||||
var selection = document.getSelection();
|
var selection = document.getSelection();
|
||||||
if (selection.type == 'Range') {
|
if (selection.type != 'Range') {
|
||||||
console.log(selection);
|
|
||||||
} else {
|
|
||||||
self.focus();
|
self.focus();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -2361,7 +2359,6 @@ Terminal.prototype.keyDown = function(ev) {
|
|||||||
|
|
||||||
this.emit('keydown', ev);
|
this.emit('keydown', ev);
|
||||||
this.emit('key', key, ev);
|
this.emit('key', key, ev);
|
||||||
console.log('keydown');
|
|
||||||
this.showCursor();
|
this.showCursor();
|
||||||
this.handler(key);
|
this.handler(key);
|
||||||
|
|
||||||
@@ -2403,7 +2400,6 @@ Terminal.prototype.keyPress = function(ev) {
|
|||||||
|
|
||||||
this.emit('keypress', key, ev);
|
this.emit('keypress', key, ev);
|
||||||
this.emit('key', key, ev);
|
this.emit('key', key, ev);
|
||||||
console.log('keypress');
|
|
||||||
this.showCursor();
|
this.showCursor();
|
||||||
this.handler(key);
|
this.handler(key);
|
||||||
|
|
||||||
@@ -2541,7 +2537,7 @@ Terminal.prototype.resize = function(x, y) {
|
|||||||
Terminal.prototype.fit = function () {
|
Terminal.prototype.fit = function () {
|
||||||
var container = this.element.parentElement,
|
var container = this.element.parentElement,
|
||||||
subjectRow = this.rowContainer.firstElementChild,
|
subjectRow = this.rowContainer.firstElementChild,
|
||||||
rows = parseInt(container.scrollHeight / subjectRow.offsetHeight),
|
rows = parseInt(container.offsetHeight / subjectRow.offsetHeight),
|
||||||
characterWidth,
|
characterWidth,
|
||||||
cols;
|
cols;
|
||||||
|
|
||||||
@@ -2549,7 +2545,7 @@ Terminal.prototype.fit = function () {
|
|||||||
characterWidth = parseInt(subjectRow.offsetWidth / this.cols);
|
characterWidth = parseInt(subjectRow.offsetWidth / this.cols);
|
||||||
subjectRow.style.display = '';
|
subjectRow.style.display = '';
|
||||||
|
|
||||||
cols = parseInt(container.scrollWidth / characterWidth);
|
cols = parseInt(container.offsetWidth / characterWidth);
|
||||||
|
|
||||||
this.resize(cols, rows);
|
this.resize(cols, rows);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user