Select the first node as the real first node
This commit is contained in:
parent
234b80b79f
commit
9253e4f0df
2
tree.go
2
tree.go
|
@ -50,7 +50,7 @@ func (tree *TreeWidget) Draw(buffer *termui.Buffer) {
|
|||
func (tree *TreeWidget) AddRootNode(node *Node) {
|
||||
tree.rootNodes = append(tree.rootNodes, node)
|
||||
if len(tree.rootNodes) == 1 {
|
||||
tree.selectedNode = node.children[0]
|
||||
tree.selectedNode = node
|
||||
}
|
||||
node.setTree(tree)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue