use spacebar to expand/collaspe nodes

develop 1.1.0
skanehira 5 years ago
parent 41180768c1
commit 0ef94ac826

@ -30,7 +30,7 @@ $ tson -url http://gorilla/likes/json
### JSON tree
| key | description |
|--------|----------------------|
|--------|--------------------------------|
| j | move down |
| k | move up |
| g | move to the top |
@ -49,6 +49,8 @@ $ tson -url http://gorilla/likes/json
| Enter | edit node |
| / | search nodes |
| ? | show helps |
| space | expand/collaspe children nodes |
| ctrl-c | exit tson |
### help
| key | description |

@ -151,6 +151,9 @@ func (t *Tree) SetKeybindings(g *Gui) {
g.AddValue()
case '?':
g.NaviPanel()
case ' ':
current := t.GetCurrentNode()
current.SetExpanded(!current.IsExpanded())
}
return event

Loading…
Cancel
Save