Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: Hide gutter after folding sibling headings https://github.com/siyuan-note/siyuan/issues/7929

Daniel3db6b519d595
diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.ts
index 818005850e..eddeda5c45 100644
--- a/app/src/protyle/gutter/index.ts
+++ b/app/src/protyle/gutter/index.ts
@@ -455,6 +455,7 @@ export class Gutter {
}
if (buttonElement.getAttribute("data-type") === "NodeHeading") {
foldHeadingGroup(protyle, foldElement, "siblings");
+ hideElements(["gutter"], protyle);
} else if (buttonElement.getAttribute("data-type") === "NodeListItem" && foldElement.parentElement.getAttribute("data-node-id")) {
// 折叠同级
let hasFold = true;
@@ -2897,6 +2898,7 @@ export class Gutter {
label: window.siyuan.languages.foldSiblingHeadings,
accelerator: updateHotkeyTip("⌥" + window.siyuan.languages.click),
async click() {
+ hideElements(["gutter"], protyle);
await foldHeadingGroup(protyle, nodeElement, "siblings");
focusBlock(nodeElement);
}