Skip to content

Commit 0636971

Browse files
committed
Fix issue with initial go-to-end
There seems to be a race condition with react-window rendering rows and when the scroll handler gets called so introduce a small delay.
1 parent 80864c9 commit 0636971

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/components.tsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1604,13 +1604,16 @@ export function MainContent({
16041604
verifierLogState.cSourceMap.logLineToCLine.get(
16051605
verifierLogState.lastInsIdx,
16061606
) || "";
1607-
setSelectedAndScroll(
1608-
verifierLogState.lastInsIdx,
1609-
"",
1610-
visualIdx,
1611-
cLineIdToVisualIdx.get(clineId) || 0,
1612-
);
1613-
}, [verifierLogState]);
1607+
setTimeout(function () {
1608+
setSelectedAndScroll(
1609+
verifierLogState.lastInsIdx,
1610+
"",
1611+
visualIdx,
1612+
cLineIdToVisualIdx.get(clineId) || 0,
1613+
"",
1614+
);
1615+
}, 500);
1616+
}, [verifierLogState, logListRef]);
16141617

16151618
const depArrowState: DepArrowState = useMemo(() => {
16161619
const arrowState = {

0 commit comments

Comments
 (0)