From fd22bbba7fc5e31b58f129d9fe0c84bc4adff1f8 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Sat, 11 May 2024 16:24:04 +0800 Subject: [PATCH 1/2] :art: Improve backlink panel expansion configuration https://github.com/siyuan-note/siyuan/issues/11262 --- kernel/conf/editor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/conf/editor.go b/kernel/conf/editor.go index a24e7c680..d94d72915 100644 --- a/kernel/conf/editor.go +++ b/kernel/conf/editor.go @@ -86,7 +86,7 @@ func NewEditor() *Editor { Justify: false, RTL: false, BacklinkExpandCount: 8, - BackmentionExpandCount: 8, + BackmentionExpandCount: -1, Markdown: util.MarkdownSettings, } } From 63839cba0cdb2cad198e7e56777e44200dd3eb53 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Sat, 11 May 2024 17:09:19 +0800 Subject: [PATCH 2/2] :art: Improve box ref indexing --- kernel/model/index.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kernel/model/index.go b/kernel/model/index.go index 6ac83c750..d82c9e3b7 100644 --- a/kernel/model/index.go +++ b/kernel/model/index.go @@ -115,10 +115,15 @@ func unindex(boxID string) { } func (box *Box) Index() { + task.AppendTask(task.DatabaseIndexRef, removeBoxRefs, box.ID) task.AppendTask(task.DatabaseIndex, index, box.ID) task.AppendTask(task.DatabaseIndexRef, IndexRefs) } +func removeBoxRefs(boxID string) { + sql.DeleteBoxRefsQueue(boxID) +} + func index(boxID string) { box := Conf.Box(boxID) if nil == box { @@ -219,8 +224,6 @@ func IndexRefs() { luteEngine := util.NewLute() boxes := Conf.GetOpenedBoxes() for _, box := range boxes { - sql.DeleteBoxRefsQueue(box.ID) - pages := pagedPaths(filepath.Join(util.DataDir, box.ID), 32) for _, paths := range pages { for _, treeAbsPath := range paths {