add utf8 input to terminal

This commit is contained in:
Jörg Breitbart
2019-01-20 22:19:50 +01:00
parent 6bdd380890
commit d7ea0edfcf
6 changed files with 60 additions and 3 deletions
+17
View File
@@ -1301,6 +1301,23 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
}
}
/**
* Writes utf8 data to the terminal.
* TODO: This currently does no flow control.
*/
public writeUtf8(data: Uint8Array): void {
if (this._isDisposed) {
return;
}
this._refreshStart = this.buffer.y;
this._refreshEnd = this.buffer.y;
this._inputHandler.parseUtf8(data);
this.updateRange(this.buffer.y);
this.refresh(this._refreshStart, this._refreshEnd);
}
/**
* Writes text to the terminal.
* @param data The text to write to the terminal.