hooks for custom control sequences

This re-implements addCsiHandler/addOscHandler to return an IDisposable.
This commit is contained in:
Per Bothner
2018-12-11 17:18:10 -08:00
parent 53fd04a886
commit 8ceea112f7
5 changed files with 81 additions and 5 deletions
+4 -1
View File
@@ -4,7 +4,7 @@
*/
import { Terminal as ITerminalApi, ITerminalOptions, IMarker, IDisposable, ILinkMatcherOptions, ITheme, ILocalizableStrings } from 'xterm';
import { ITerminal } from '../Types';
import { ITerminal, IInputHandler } from '../Types';
import { Terminal as TerminalCore } from '../Terminal';
import * as Strings from '../Strings';
@@ -15,6 +15,9 @@ export class Terminal implements ITerminalApi {
this._core = new TerminalCore(options);
}
public get inputHandler(): IInputHandler {
return (this._core as TerminalCore).inputHandler;
}
public get element(): HTMLElement { return this._core.element; }
public get textarea(): HTMLTextAreaElement { return this._core.textarea; }
public get rows(): number { return this._core.rows; }