Some fixes
This commit is contained in:
@@ -106,7 +106,6 @@ func (w *TreeBrowser) GetKeyMap() *t.KeyMap { return w.keyMap }
|
||||
func (w *TreeBrowser) SetKeyMap(km *t.KeyMap) { w.keyMap = km }
|
||||
|
||||
func (w *TreeBrowser) HandleKey(ev *tcell.EventKey) bool {
|
||||
w.Log("TreeBrowser Handling Key: %s", ev.Name())
|
||||
if !w.active || !w.focusable {
|
||||
return false
|
||||
}
|
||||
@@ -142,7 +141,6 @@ func (w *TreeBrowser) Draw(screen tcell.Screen) {
|
||||
break
|
||||
}
|
||||
}
|
||||
th.DrawText(x, y, fmt.Sprintf("Cursor: %d", w.cursor), w.style, screen)
|
||||
}
|
||||
|
||||
func (w *TreeBrowser) SetStyle(s tcell.Style) { w.style = s }
|
||||
@@ -330,7 +328,7 @@ func (tn *TreeNode) GetLabelPath() []string {
|
||||
path = tn.parent.GetLabelPath()
|
||||
|
||||
}
|
||||
return append([]string{tn.Label()}, path...)
|
||||
return append(path, tn.Label())
|
||||
}
|
||||
func (tn *TreeNode) getList() []string {
|
||||
pre := strings.Repeat("-", tn.Depth())
|
||||
|
||||
Reference in New Issue
Block a user