Merge remote-tracking branch 'ups/master' into 1128_addons

This commit is contained in:
Daniel Imms
2019-05-12 09:44:09 -07:00
8 changed files with 99 additions and 23 deletions
+38
View File
@@ -676,11 +676,24 @@ declare module 'xterm' {
*/
getSelection(): string;
/**
* Gets the selection position or undefined if there is no selection.
*/
getSelectionPosition(): ISelectionPosition | undefined;
/**
* Clears the current terminal selection.
*/
clearSelection(): void;
/**
* Selects text within the terminal.
* @param column The column the selection starts at..
* @param row The row the selection starts at.
* @param length The length of the selection.
*/
select(column: number, row: number, length: number): void;
/**
* Selects all text within the terminal.
*/
@@ -878,6 +891,31 @@ declare module 'xterm' {
activate(terminal: Terminal): void;
}
/**
* An object representing a selecrtion within the terminal.
*/
interface ISelectionPosition {
/**
* The start column of the selection.
*/
startColumn: number;
/**
* The start row of the selection.
*/
startRow: number;
/**
* The end column of the selection.
*/
endColumn: number;
/**
* The end row of the selection.
*/
endRow: number;
}
interface IBuffer {
/**
* The y position of the cursor. This ranges between `0` (when the