Skip to content

Commit 4f936cb

Browse files
document an implied invariant
1 parent b10c68d commit 4f936cb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/shared_types.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ type LatexContext = {
5050
endIndex: number;
5151
selectionL?: NodeBase;
5252
selectionR?: NodeBase;
53+
54+
// in the end we expect to have either a cursorL or cursorParent
55+
// to use to restore selection. We collect both because of shenanigans
56+
// with MathBlock, and maybe others. If the cursorL is defined we will use it. Otherwise
57+
// we will fall back to the cursorParent.
5358
cursorL?: NodeBase | 0;
5459
cursorParent?: NodeBase | 0;
5560
};

0 commit comments

Comments
 (0)