mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-11 18:32:12 +02:00
Initialize various maps
This commit is contained in:
@@ -151,6 +151,9 @@ type ParsedShortcut struct {
|
||||
var parsed_shortcut_cache map[string]ParsedShortcut
|
||||
|
||||
func ParseShortcut(spec string) *ParsedShortcut {
|
||||
if parsed_shortcut_cache == nil {
|
||||
parsed_shortcut_cache = make(map[string]ParsedShortcut, 128)
|
||||
}
|
||||
if val, ok := parsed_shortcut_cache[spec]; ok {
|
||||
return &val
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user