⚡ perf(vscode): 代码阅读预览屏幕外的顶层块跳过样式、排版和绘制(content-visibility),没画过的按内容估的高度占位;跳到某一行、恢复滚动位置、跳到改动和定义前先把目标那一带照常排版再量,滚过去位置不变

This commit is contained in:
cruldra committed 2026-10-13 15:11:21 +11:00
1 parent ffb0f147e1
commit 8a5d3761fd
9 files changed
+201 -9

No files matched your search

@@ -75,6 +75,7 @@ export function StickyLines({ content, blocks, settings }: { content: RefObject<
const card = content.current?.querySelector<HTMLElement>(`.cr-block[data-id="${id}"]`)
if (!card)
return
pageLayout.settle(card)
window.scrollTo(0, card.getBoundingClientRect().top + window.scrollY - pageLayout.pinnedHeight() - stickyInset(card, settings))
flash(card)
}