Skip to content

Commit 6075498

Browse files
committed
Add class header comments
1 parent 264757e commit 6075498

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/SelectionManager.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ const LINE_DATA_WIDTH_INDEX = 2;
4545
const NON_BREAKING_SPACE_CHAR = String.fromCharCode(160);
4646
const ALL_NON_BREAKING_SPACE_REGEX = new RegExp(NON_BREAKING_SPACE_CHAR, 'g');
4747

48+
/**
49+
* A class that manages the selection of the terminal. With help from
50+
* SelectionModel, SelectionManager handles with all logic associated with
51+
* dealing with the selection, including handling mouse interaction, wide
52+
* characters and fetching the actual text within the selection. Rendering is
53+
* not handled by the SelectionManager but a 'refresh' event is fired when the
54+
* selection is ready to be redrawn.
55+
*/
4856
export class SelectionManager extends EventEmitter {
4957
protected _model: SelectionModel;
5058

src/SelectionModel.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
import { ITerminal } from './Interfaces';
66

7+
/**
8+
* Represents a selection within the buffer. This model only cares about column
9+
* and row coordinates, not wide characters.
10+
*/
711
export class SelectionModel {
812
/**
913
* Whether select all is currently active.

0 commit comments

Comments
 (0)