Merge branch 'master' into 1179_alt_backspace
This commit is contained in:
@@ -14,6 +14,10 @@ import { BufferSet } from './BufferSet';
|
||||
import { MockTerminal } from './utils/TestUtils.test';
|
||||
import { LineData, CharData } from './Types';
|
||||
|
||||
class TestMockTerminal extends MockTerminal {
|
||||
emit(event: string, data: any): void {}
|
||||
}
|
||||
|
||||
class TestSelectionManager extends SelectionManager {
|
||||
constructor(
|
||||
terminal: ITerminal,
|
||||
@@ -48,7 +52,7 @@ describe('SelectionManager', () => {
|
||||
dom = new jsdom.JSDOM('');
|
||||
window = dom.window;
|
||||
document = window.document;
|
||||
terminal = new MockTerminal();
|
||||
terminal = new TestMockTerminal();
|
||||
terminal.cols = 80;
|
||||
terminal.rows = 2;
|
||||
terminal.options.scrollback = 100;
|
||||
|
||||
@@ -255,7 +255,7 @@ export class SelectionManager extends EventEmitter implements ISelectionManager
|
||||
public selectAll(): void {
|
||||
this._model.isSelectAllActive = true;
|
||||
this.refresh();
|
||||
this.emit('selection');
|
||||
this._terminal.emit('selection');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -544,7 +544,7 @@ export class SelectionManager extends EventEmitter implements ISelectionManager
|
||||
this._removeMouseDownListeners();
|
||||
|
||||
if (this.hasSelection)
|
||||
this.emit('selection');
|
||||
this._terminal.emit('selection');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -59,6 +59,9 @@ export function attach(term, socket, bidirectional, buffered) {
|
||||
};
|
||||
|
||||
term._sendData = function(data) {
|
||||
if (socket.readyState !== 1) {
|
||||
return;
|
||||
}
|
||||
socket.send(data);
|
||||
};
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ export function proposeGeometry(term) {
|
||||
};
|
||||
|
||||
export function fit(term) {
|
||||
var geometry = exports.proposeGeometry(term);
|
||||
var geometry = proposeGeometry(term);
|
||||
if (geometry) {
|
||||
// Force a full render
|
||||
if (term.rows !== geometry.rows || term.cols !== geometry.cols) {
|
||||
|
||||
Reference in New Issue
Block a user