Fix Nil map error
This commit is contained in:
parent
7441c3e637
commit
c2f2d16097
@ -273,6 +273,9 @@ func (k *Keyboard) CurrentKeymap() Keymap {
|
||||
if ok {
|
||||
return keymap
|
||||
}
|
||||
if k.keymaps == nil {
|
||||
k.keymaps = make(map[string]Keymap)
|
||||
}
|
||||
k.keymaps[k.KeymapOrder[k.currentKeyMap]] = LoadKeymap(k.KeymapOrder[k.currentKeyMap], k.KeymapPath)
|
||||
return k.keymaps[k.KeymapOrder[k.currentKeyMap]]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user