(opts: {
search: () => FileSearchControl | undefined
find: ReturnType<typeof createFileFind>
})
| 405 | } |
| 406 | |
| 407 | function useSearchHandle(opts: { |
| 408 | search: () => FileSearchControl | undefined |
| 409 | find: ReturnType<typeof createFileFind> |
| 410 | }) { |
| 411 | createEffect(() => { |
| 412 | const search = opts.search() |
| 413 | if (!search) return |
| 414 | |
| 415 | const handle = { |
| 416 | focus: () => opts.find.focus(), |
| 417 | } satisfies FileSearchHandle |
| 418 | |
| 419 | search.register(handle) |
| 420 | onCleanup(() => search.register(null)) |
| 421 | }) |
| 422 | } |
| 423 | |
| 424 | function createLineCallbacks(opts: { |
| 425 | viewer: Viewer |
no outgoing calls
no test coverage detected