🎨 Improve the behavior of Jump to parent block in lists https://github.com/siyuan-note/siyuan/issues/16516

Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2025-12-16 21:14:40 +08:00
parent fb1a92ce78
commit 4b1e79bd15
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -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
}