mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-03 22:21:48 +01:00
🎨 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:
parent
fb1a92ce78
commit
4b1e79bd15
1 changed files with 14 additions and 1 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue