mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 18:10:12 +01:00
🎨 文档树支持 Ctrl+Click 和 Shift+↑/↓ 进行多选 https://github.com/siyuan-note/siyuan/issues/1359
This commit is contained in:
parent
47a8b0c050
commit
e3a6bb2251
4 changed files with 55 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue