Use the terminal and circular list interface
This commit is contained in:
+2
-1
@@ -188,12 +188,13 @@ export interface ITerminal extends PublicTerminal, IElementAccessor, IBufferAcce
|
||||
isFocused: boolean;
|
||||
mouseHelper: IMouseHelper;
|
||||
bracketedPasteMode: boolean;
|
||||
|
||||
applicationCursor: boolean;
|
||||
/**
|
||||
* Emit the 'data' event and populate the given data.
|
||||
* @param data The data to populate in the event.
|
||||
*/
|
||||
handler(data: string): void;
|
||||
send(data: string): void;
|
||||
scrollLines(disp: number, suppressScrollEvent?: boolean): void;
|
||||
cancel(ev: Event, force?: boolean): boolean | void;
|
||||
log(text: string): void;
|
||||
|
||||
@@ -3,9 +3,8 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { Terminal } from '../Terminal';
|
||||
import { ITerminal, ICircularList } from '../Types';
|
||||
import { C0 } from '../EscapeSequences';
|
||||
import { CircularList } from '../utils/CircularList';
|
||||
import { LineData } from '../Types';
|
||||
|
||||
enum Direction {
|
||||
@@ -20,9 +19,9 @@ export class AltClickHandler {
|
||||
private _startCol: number;
|
||||
private _endRow: number;
|
||||
private _endCol: number;
|
||||
private _lines: CircularList<LineData>;
|
||||
private _lines: ICircularList<LineData>;
|
||||
|
||||
constructor(private _mouseEvent: MouseEvent, private _terminal: Terminal) {
|
||||
constructor(private _mouseEvent: MouseEvent, private _terminal: ITerminal) {
|
||||
this._lines = this._terminal.buffer.lines;
|
||||
this._startCol = this._terminal.buffer.x;
|
||||
this._startRow = this._terminal.buffer.y;
|
||||
|
||||
@@ -70,6 +70,9 @@ export class MockTerminal implements ITerminal {
|
||||
write(data: string): void {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
send(data: string): void {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
bracketedPasteMode: boolean;
|
||||
mouseHelper: IMouseHelper;
|
||||
renderer: IRenderer;
|
||||
@@ -93,6 +96,7 @@ export class MockTerminal implements ITerminal {
|
||||
scrollback: number;
|
||||
buffers: IBufferSet;
|
||||
buffer: IBuffer;
|
||||
applicationCursor: boolean;
|
||||
handler(data: string): void {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user