diff options
author | Mike JS. Choi <mkchoi212@icloud.com> | 2018-05-31 16:05:06 -0500 |
---|---|---|
committer | Mike JS. Choi <mkchoi212@icloud.com> | 2018-05-31 16:05:06 -0500 |
commit | 02bd481bacc94546a2766f590024d9b61fbf7a3d (patch) | |
tree | 5bbdd09827190e8496e81c62449896c35db3c976 | |
parent | 96ca3ec91ad55fd90436f1d32f6b6f18c7ef6a41 (diff) |
Fix nil binding map bug
-rw-r--r-- | key/key.go | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -85,7 +85,9 @@ func LoadSettings() (b Binding, err error) { // parseSettings looks for `$HOME/.fac.yml` and parses it into a `Binding` value // If the file does not exist, it returns the `defaultBinding` -func parseSettings() (b Binding) { +func parseSettings() Binding { + b := make(Binding) + usr, err := currentUser() if err != nil { fmt.Println(color.Yellow(color.Regular, "fac: %s. Default key-bindings will be used", err.Error())) @@ -105,7 +107,7 @@ func parseSettings() (b Binding) { return defaultBinding } - return + return b } // consolidate takes the user's key-binding settings and fills the missings key-binds |