From eca318c4ff2f601ede22b0a281bb0faef6073923 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Fri, 12 Sep 2025 19:48:51 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/15833 point 2 Signed-off-by: Daniel <845765@qq.com> --- kernel/model/block.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/kernel/model/block.go b/kernel/model/block.go index ed78bb87a..4e35284e7 100644 --- a/kernel/model/block.go +++ b/kernel/model/block.go @@ -234,6 +234,22 @@ func GetBlockSiblingID(id string) (parent, previous, next string) { next = flb.ID } } + + if "" == previous && "" == next && nil != current { + parent = current.ID + if nil != current.Previous { + previous = current.Previous.ID + if flb := treenode.FirstChildBlock(current.Previous); nil != flb { + previous = flb.ID + } + } + if nil != current.Next { + next = current.Next.ID + if flb := treenode.FirstChildBlock(current.Next); nil != flb { + next = flb.ID + } + } + } return }