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 id: number;
|
||||||
readonly isDisposed: boolean;
|
readonly isDisposed: boolean;
|
||||||
readonly line: number;
|
readonly line: number;
|
||||||
|
onDispose: IEvent<void>;
|
||||||
}
|
}
|
||||||
export interface IModes {
|
export interface IModes {
|
||||||
insertMode: boolean;
|
insertMode: boolean;
|
||||||
|
|||||||
@@ -32,5 +32,6 @@ export class Marker extends Disposable implements IMarker {
|
|||||||
this.line = -1;
|
this.line = -1;
|
||||||
// Emit before super.dispose such that dispose listeners get a change to react
|
// Emit before super.dispose such that dispose listeners get a change to react
|
||||||
this._onDispose.fire();
|
this._onDispose.fire();
|
||||||
|
super.dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+7
@@ -382,6 +382,13 @@ declare module 'xterm' {
|
|||||||
* -1 if the marker has been disposed.
|
* -1 if the marker has been disposed.
|
||||||
*/
|
*/
|
||||||
readonly line: number;
|
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