🎨 文档树支持 Ctrl+ClickShift+↑/↓ 进行多选 https://github.com/siyuan-note/siyuan/issues/1359

This commit is contained in:
Liang Ding 2022-11-04 21:37:10 +08:00
parent 47a8b0c050
commit e3a6bb2251
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
4 changed files with 55 additions and 0 deletions

View file

@ -46,6 +46,18 @@ type BlockTree struct {
HPath string // 文档逻辑路径
}
func GetBlockTreeByPath(path string) *BlockTree {
blockTreesLock.Lock()
defer blockTreesLock.Unlock()
for _, b := range blockTrees {
if b.Path == path {
return b
}
}
return nil
}
func CountTrees() (ret int) {
roots := map[string]bool{}
for _, b := range blockTrees {