🐛 fix(vscode): 代码阅读的钉住卡片改成每张卡片都算一层,折叠着、没有子块的高卡片滚到一半也钉在顶上

This commit is contained in:
cruldra committed 2026-10-08 07:17:26 +08:00
1 parent a53a5d4504
commit a1fbefd3aa
14 files changed
+45 -34

No files matched your search

+1 -1
View File
@@ -98,7 +98,7 @@ export interface QaMessage {
}
/**
* VS Code 的 Sticky Scroll 设置(editor.stickyScroll.enabled / editor.stickyScroll.maxLineCount):预览滚进一张卡片的子块时把它钉在顶上,
* VS Code 的 Sticky Scroll 设置(editor.stickyScroll.enabled / editor.stickyScroll.maxLineCount):卡片的开头滚到预览顶上后面、卡片还有一部分看得见时把它钉在顶上,
* 外层的在上、里层的在下,最多钉 maxLineCount 行。
*/
export interface StickyScrollSettings {
@@ -665,7 +665,7 @@ class Preview {
this.post({ type: 'hoverDelay', delay: hover.get<number>('delay', 300), hidingDelay: hover.get<number>('hidingDelay', 300) })
}
/** VS Code 的 Sticky Scroll 设置(按这份文件取,语言自己的设置优先):页面按它把外层卡片钉在顶上。 */
/** VS Code 的 Sticky Scroll 设置(按这份文件取,语言自己的设置优先):页面按它把滚出去一半的卡片钉在顶上。 */
private postStickyScroll(): void {
const sticky = workspace.getConfiguration('editor.stickyScroll', this.document)
this.post({ type: 'stickyScroll', enabled: sticky.get<boolean>('enabled', true), maxLineCount: sticky.get<number>('maxLineCount', 5) })