fix(tui): keep stream cadence responsive while typing

This commit is contained in:
Brooklyn Nicholson 2026-04-26 04:32:55 -05:00
parent 381121025e
commit bbd950efcf
4 changed files with 19 additions and 13 deletions

View file

@ -1,7 +1,6 @@
import type { ScrollBoxHandle } from '@hermes/ink'
import type { SelectionApi } from './interfaces.js'
import { markScrolling } from './interactionMode.js'
export interface SelectionSnap {
anchor?: { row: number } | null
@ -30,8 +29,6 @@ export function scrollWithSelectionBy(delta: number, { scrollRef, selection }: S
return
}
markScrolling()
const sel = selection.getState() as null | SelectionSnap
const top = s.getViewportTop()
const bottom = top + viewport - 1