mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Improve find-replace for database block key text updating https://github.com/siyuan-note/siyuan/issues/13746
This commit is contained in:
parent
87c8db09a0
commit
d7ebe561f0
2 changed files with 17 additions and 8 deletions
|
|
@ -536,6 +536,7 @@ func FindReplace(keyword, replacement string, replaceTypes map[string]bool, ids
|
|||
|
||||
luteEngine := util.NewLute()
|
||||
var reloadTreeIDs []string
|
||||
updateNodes := map[string]*ast.Node{}
|
||||
for i, id := range ids {
|
||||
bt := treenode.GetBlockTree(id)
|
||||
if nil == bt {
|
||||
|
|
@ -863,6 +864,8 @@ func FindReplace(keyword, replacement string, replaceTypes map[string]bool, ids
|
|||
}
|
||||
}
|
||||
|
||||
updateNodes[id] = node
|
||||
|
||||
util.PushEndlessProgress(fmt.Sprintf(Conf.Language(206), i+1, len(ids)))
|
||||
}
|
||||
|
||||
|
|
@ -880,6 +883,8 @@ func FindReplace(keyword, replacement string, replaceTypes map[string]bool, ids
|
|||
refreshProtyle(id)
|
||||
}
|
||||
|
||||
updateAttributeViewBlockText(updateNodes)
|
||||
|
||||
sql.FlushQueue()
|
||||
util.PushClearProgress()
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue