Skip to content

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

:art: Improve the behavior of `Jump to parent block` in lists https://github.com/siyuan-note/siyuan/issues/16516#issuecomment-3649752632

Daniel1acbb7d06d1d
diff --git a/kernel/model/block.go b/kernel/model/block.go
index 58b17572eb..d8e650f5f2 100644
--- a/kernel/model/block.go
+++ b/kernel/model/block.go
@@ -205,6 +205,11 @@ func GetBlockSiblingID(id string) (parent, previous, next string) {
if nil == current || !current.IsBlock() {
return
}
+
+ if nil != current.Parent && ast.NodeListItem == current.Parent.Type {
+ current = current.Parent
+ }
+
parentBlock := treenode.ParentBlock(current)
if nil == parentBlock {
return