mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
add super.dispose, add oDispose to API
This commit is contained in:
Vendored
+1
@@ -183,6 +183,7 @@ export interface IMarker extends IDisposable {
|
||||
readonly id: number;
|
||||
readonly isDisposed: boolean;
|
||||
readonly line: number;
|
||||
onDispose: IEvent<void>;
|
||||
}
|
||||
export interface IModes {
|
||||
insertMode: boolean;
|
||||
|
||||
@@ -32,5 +32,6 @@ export class Marker extends Disposable implements IMarker {
|
||||
this.line = -1;
|
||||
// Emit before super.dispose such that dispose listeners get a change to react
|
||||
this._onDispose.fire();
|
||||
super.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+7
@@ -382,6 +382,13 @@ declare module 'xterm' {
|
||||
* -1 if the marker has been disposed.
|
||||
*/
|
||||
readonly line: number;
|
||||
|
||||
/**
|
||||
* Event listener to get notified when the marker gets disposed. Automatic disposal
|
||||
* might happen for a marker, that got invalidated by scrolling out or removal of
|
||||
* a line from the buffer.
|
||||
*/
|
||||
onDispose: IEvent<void>;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user