1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-01-20 05:19:24 +02:00

better error messages

This commit is contained in:
David Chen 2019-12-06 22:39:41 -08:00
parent e425f1df87
commit 7194dfa43c

View File

@ -338,14 +338,14 @@ func (gui *Gui) getKey(name string) interface{} {
if len(key) > 1 {
binding := keymap[strings.ToLower(key)]
if binding == nil {
log.Fatal("Unrecognized binding: " + strings.ToLower(key))
log.Fatalf("Unrecognized key %s for keybinding %s", strings.ToLower(key), name)
} else {
return binding
}
} else if len(key) == 1 {
return []rune(key)[0]
}
log.Fatal("Key empty for function: " + strings.ToLower(name))
log.Fatal("Key empty for keybinding: " + strings.ToLower(name))
return nil
}