Pārlūkot izejas kodu

:bug: `Enter` after the folded heading in the list will cause the blocks to be reversed below the heading Fix https://github.com/siyuan-note/siyuan/issues/7984

Liang Ding 2 gadi atpakaļ
vecāks
revīzija
1315b0e8c6
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      kernel/treenode/heading.go

+ 2 - 2
kernel/treenode/heading.go

@@ -50,8 +50,8 @@ func MoveFoldHeading(updateNode, oldNode *ast.Node) {
 	})
 	for _, h := range updateFoldHeadings {
 		children := foldHeadings[h.ID]
-		for _, c := range children {
-			h.Next.InsertAfter(c) // Next 是 Block IAL
+		for i := len(children) - 1; 0 <= i; i-- {
+			h.Next.InsertAfter(children[i]) // Next 是 Block IAL
 		}
 	}
 	return