RENAME kMap -> FUNC_MAP
this naming makes more sense
This commit is contained in:
parent
211911342e
commit
4623f0d63c
6
main.go
6
main.go
@ -54,7 +54,7 @@ func main() {
|
|||||||
return UI.expandedView.GetInnerRect()
|
return UI.expandedView.GetInnerRect()
|
||||||
})
|
})
|
||||||
|
|
||||||
var kMap = map[string]func(){
|
var FUNC_MAP = map[string]func(){
|
||||||
"showChildrenContent": func() {
|
"showChildrenContent": func() {
|
||||||
r, _ := UI.expandedView.GetSelection()
|
r, _ := UI.expandedView.GetSelection()
|
||||||
if !InsidePlaylist {
|
if !InsidePlaylist {
|
||||||
@ -160,11 +160,11 @@ func main() {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
config.GenerateKeyMap(kMap)
|
config.GenerateKeyMap(FUNC_MAP)
|
||||||
|
|
||||||
UI.expandedView.SetInputCapture(func(e *tcell.EventKey) *tcell.EventKey {
|
UI.expandedView.SetInputCapture(func(e *tcell.EventKey) *tcell.EventKey {
|
||||||
if val, ok := config.KEY_MAP[int(e.Rune())]; ok {
|
if val, ok := config.KEY_MAP[int(e.Rune())]; ok {
|
||||||
kMap[val]()
|
FUNC_MAP[val]()
|
||||||
return nil
|
return nil
|
||||||
} else {
|
} else {
|
||||||
return e
|
return e
|
||||||
|
Loading…
Reference in New Issue
Block a user