( selection: SelectionState, searchQuery: string, )
| 14 | } |
| 15 | |
| 16 | export function captureOverlaySnapshot( |
| 17 | selection: SelectionState, |
| 18 | searchQuery: string, |
| 19 | ): OverlaySnapshot { |
| 20 | const bounds = selectionBounds(selection) |
| 21 | return { |
| 22 | selection: bounds |
| 23 | ? { |
| 24 | startCol: bounds.start.col, |
| 25 | startRow: bounds.start.row, |
| 26 | endCol: bounds.end.col, |
| 27 | endRow: bounds.end.row, |
| 28 | } |
| 29 | : null, |
| 30 | searchQuery, |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | function containsSelection( |
| 35 | outer: OverlaySelectionBounds | null, |