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

Daniel4b1e79bd1547
diff --git a/kernel/model/block.go b/kernel/model/block.go
index 03474477bf..e41851f432 100644
--- a/kernel/model/block.go
+++ b/kernel/model/block.go
@@ -244,7 +244,20 @@ func GetBlockSiblingID(id string) (parent, previous, next string) {
}
parent = listParent2.ID
- previous, next = getPreNext(listParent)
+ if nil == listParent.Previous {
+ if nil != listParent2.Previous {
+ previous = listParent2.Previous.ID
+ }
+ } else {
+ previous = listParent.Previous.ID
+ }
+ if nil == listParent.Next {
+ if nil != listParent2.Next {
+ next = listParent2.Next.ID
+ }
+ } else {
+ next = listParent.Next.ID
+ }
return
}