mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-14 12:10:45 +03:00
fix(tui): preserve subagent list position (#39156)
Co-authored-by: Kit Langton <kit.langton@gmail.com>
This commit is contained in:
committed by
GitHub
Unverified
parent
7eb51d0507
commit
f5700808c5
@@ -103,7 +103,8 @@ export function SubagentsTab(props: { sessionID: string }) {
|
||||
setStore("selected", next)
|
||||
const scrollCurrentIntoView = () => scrollToIndex(next, true)
|
||||
scrollCurrentIntoView()
|
||||
requestAnimationFrame(scrollCurrentIntoView)
|
||||
// The remounted scrollbox finishes layout on the next frame and resets its scroll position.
|
||||
requestAnimationFrame(() => requestAnimationFrame(scrollCurrentIntoView))
|
||||
}
|
||||
wasActive = true
|
||||
if (store.selected >= list.length) moveTo(Math.max(0, list.length - 1))
|
||||
|
||||
Reference in New Issue
Block a user