Update markers after a reflow

This commit is contained in:
Daniel Imms
2018-12-31 13:15:23 -08:00
parent 40e8618cf5
commit 840970eac7
4 changed files with 195 additions and 10 deletions
+13
View File
@@ -75,6 +75,19 @@ export class EventEmitter extends Disposable implements IEventEmitter, IDisposab
}
}
public emitMayRemoveListeners(type: string, ...args: any[]): void {
if (!this._events[type]) {
return;
}
const obj = this._events[type];
let length = obj.length;
for (let i = 0; i < obj.length; i++) {
obj[i].apply(this, args);
i -= length - obj.length;
length = obj.length;
}
}
public listeners(type: string): XtermListener[] {
return this._events[type] || [];
}