Skip to content
Source
Sign inSign up
Open History to see the last commit

composerSelection.ts

15 lines349 Bytes

1export type ComposerSelectionRange = {
2 start: number;
3 end: number;
4};
5​
6export function didComposerSelectionChangeVisibly(
7 previous: ComposerSelectionRange,
8 next: ComposerSelectionRange | null,
9): boolean {
10 return (
11 next !== null &&
12 next.start !== next.end &&
13 (next.start !== previous.start || next.end !== previous.end)
14 );