| 1 | export function shouldScrollWorkspaceTreeSelection({ |
| 2 | selectedPath, |
| 3 | pendingRevealPath, |
| 4 | actualTreeVisible, |
| 5 | selectedIndex, |
| 6 | }: { |
| 7 | selectedPath: string | null; |
| 8 | pendingRevealPath: string | null; |
| 9 | actualTreeVisible: boolean; |
| 10 | selectedIndex: number; |
| 11 | }): boolean { |
| 12 | return Boolean( |
| 13 | selectedPath && |
| 14 | pendingRevealPath === selectedPath && |
| 15 | actualTreeVisible && |
| 16 | selectedIndex >= 0, |
| 17 | ); |
| 18 | } |
| 19 |