change buffer interface from IBuffer to IBufferNamespace

This commit is contained in:
javacs3
2020-03-22 12:13:52 +08:00
parent 5fdbd7428b
commit 44ff7b0f5f
13 changed files with 138 additions and 138 deletions
+8 -9
View File
@@ -574,12 +574,7 @@ declare module 'xterm' {
* normal buffer or the alt buffer depending on what's running in the
* terminal.
*/
readonly buffer: IBuffer;
/**
* (EXPERIMENTAL) The terminal's current bufferSet.
*/
readonly buffers: IBufferSet;
readonly buffer: IBufferNamespace;
/**
* (EXPERIMENTAL) Get all markers registered against the buffer. If the alt
@@ -1173,6 +1168,10 @@ declare module 'xterm' {
* Represents a terminal buffer.
*/
interface IBuffer {
/**
* The type of the buffer.
*/
readonly type: 'normal' | 'alternate';
/**
* The y position of the cursor. This ranges between `0` (when the
* cursor is at baseY) and `Terminal.rows - 1` (when the cursor is on the
@@ -1222,12 +1221,12 @@ declare module 'xterm' {
getNullCell(): IBufferCell;
}
interface IBufferSet {
readonly alt: IBuffer;
interface IBufferNamespace {
readonly alternate: IBuffer;
readonly normal: IBuffer;
readonly active: IBuffer;
onBufferActivate: IEvent<{ activeBuffer: IBuffer, inactiveBuffer: IBuffer }>;
onBufferChange: IEvent<IBuffer>;
}
/**