Register forwardEvent calls
This commit is contained in:
@@ -90,10 +90,10 @@ export abstract class CoreTerminal extends Disposable {
|
||||
this._instantiationService.setService(ICharsetService, this._charsetService);
|
||||
|
||||
// Setup listeners
|
||||
forwardEvent(this._bufferService.onResize, this._onResize);
|
||||
forwardEvent(this._coreService.onData, this._onData);
|
||||
forwardEvent(this._coreService.onBinary, this._onBinary);
|
||||
this.optionsService.onOptionChange(key => this._updateOptions(key));
|
||||
this.register(forwardEvent(this._bufferService.onResize, this._onResize));
|
||||
this.register(forwardEvent(this._coreService.onData, this._onData));
|
||||
this.register(forwardEvent(this._coreService.onBinary, this._onBinary));
|
||||
this.register(this.optionsService.onOptionChange(key => this._updateOptions(key)));
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
|
||||
@@ -64,6 +64,6 @@ export class EventEmitter<T, U = void> implements IEventEmitter<T, U> {
|
||||
}
|
||||
}
|
||||
|
||||
export function forwardEvent<T>(from: IEvent<T>, to: IEventEmitter<T>): void {
|
||||
from(e => to.fire(e));
|
||||
export function forwardEvent<T>(from: IEvent<T>, to: IEventEmitter<T>): IDisposable {
|
||||
return from(e => to.fire(e));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user