()
| 95 | * fullscreen mode (selection is only available in alt-screen). |
| 96 | */ |
| 97 | export function useHasSelection(): boolean { |
| 98 | useContext(StdinContext) |
| 99 | const ink = instances.get(process.stdout) |
| 100 | return useSyncExternalStore( |
| 101 | ink ? ink.subscribeToSelectionChange : NO_SUBSCRIBE, |
| 102 | ink ? ink.hasTextSelection : ALWAYS_FALSE, |
| 103 | ) |
| 104 | } |
| 105 |