🐛 修改带命名的文档名锚文本会更新为文档名 https://github.com/siyuan-note/siyuan/issues/6259

This commit is contained in:
Liang Ding 2022-10-19 09:44:56 +08:00
parent 0eb535c012
commit 95d2b7f67c
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -1275,12 +1275,14 @@ func RenameDoc(boxID, p, title string) (err error) {
title = "Untitled"
}
refText := getNodeRefText(tree.Root)
evt := util.NewCmdResult("rename", 0, util.PushModeBroadcast, util.PushModeNone)
evt.Data = map[string]interface{}{
"box": boxID,
"id": tree.Root.ID,
"path": p,
"title": title,
"box": boxID,
"id": tree.Root.ID,
"path": p,
"title": title,
"refText": refText,
}
util.PushEvent(evt)